Introduction
Transactions
Buyers
Checkout Sessions
Payment links
Payment options
Refunds
Instruments
- Card schemes
- Card details
- Digital wallets
- Gift cards
- Payment methods
- Payment method definitions
Vault
- Account updater
- Network tokens
- Payment service tokens
- Vault Forward
- Vault Forward endpoints
- Vault Forward authentication
Connections
- All services
- Payment services
- Digital wallets
- Anti-fraud services
Other
- Flow
- Reports
- Report executions
- Webhook subscriptions
Create batch transaction refund
Create a refund for all instruments on a transaction.
POST
/
transactions
/
{transaction_id}
/
refunds
/
all
Copy
Ask AI
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Transactions.Refunds.All.CreateAsync(transactionId: "7099948d-7286-47e4-aad8-b68f7eb44591");
// handle response
Copy
Ask AI
{
"items": [
{
"type": "refund",
"id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211",
"transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591",
"payment_service_refund_id": "refund_xYqd43gySMtori",
"status": "succeeded",
"currency": "EUR",
"amount": 1299,
"reason": "Refund due to user request.",
"target_type": "payment-method",
"target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt",
"external_identifier": "refund-12345",
"transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn",
"transaction_external_identifier": "transaction-12345",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"creator": {
"email_address": "jhon.doe@gr4vy.com",
"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"name": "Jhon Doe"
}
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}
This endpoint requires the transactions.write
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
The ID of the merchant account to use for this request.
Examples:
"default"
Path Parameters
The ID of the transaction
Examples:
"7099948d-7286-47e4-aad8-b68f7eb44591"
Body
application/json
Response
201
application/json
Successful Response
The response is of type object
.
Was this page helpful?
Copy
Ask AI
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Transactions.Refunds.All.CreateAsync(transactionId: "7099948d-7286-47e4-aad8-b68f7eb44591");
// handle response
Copy
Ask AI
{
"items": [
{
"type": "refund",
"id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211",
"transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591",
"payment_service_refund_id": "refund_xYqd43gySMtori",
"status": "succeeded",
"currency": "EUR",
"amount": 1299,
"reason": "Refund due to user request.",
"target_type": "payment-method",
"target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt",
"external_identifier": "refund-12345",
"transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn",
"transaction_external_identifier": "transaction-12345",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"creator": {
"email_address": "jhon.doe@gr4vy.com",
"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"name": "Jhon Doe"
}
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}
Assistant
Responses are generated using AI and may contain mistakes.