Refunds

A Refund allows you to refund money that you had collected from a customer with a Payment Intent. You're able to do partial refunds and also able to do multiple refunds for the same Payment Intent.

You can also issue refunds from the dashboard.

amount
string

The amount of the Payment Intent that will be refunded to the customer

Example: "300.10"
arrival
string

When the refund is expected to arrive in the destination

Example: "Credit approximately 5-10 business days later, depending upon the bank."
created_at
datetime

The ISO 8601 datetime at which the Refund was created

Example: "2020-04-11T15:48:11.642Z"
currency
string

The currency of the amount, as an ISO 4217 currency code.

It will always match the currency of the Payment Intent.

Example: "GBP"
destination
enum

Where the Refund amount will be sent to

Possible values: "original_form_of_payment"
id
string

Duffel's unique identifier for the Refund

Example: "ref_00009hthhsUZ8W4LxQgkjo"
live_mode
boolean

Whether the Refund was created in live mode. This field will be set to true if the Refund was created in live mode, or false if it was created in test mode.

Example: true
net_amount
string

The amount deducted from your Balance to cover the Refund amount

Example: "300.10"
net_currency
string

The currency of the net_amount, as an ISO 4217 currency code.

This currency will match your Balance currency.

Example: "GBP"
payment_intent_id
string

Duffel's unique identifier for the Payment Intent that the Refund is for

Example: "pit_00009hthhsUZ8W4LxQgkjo"
status
enum

The status of the Refund.

Succeeded: The refund is on its way to the destination.

Pending: The Refund could not be processed immediately, and is pending processing.

Failed: A refund can fail if the customer’s bank or card issuer has been unable to process it correctly (e.g., a closed bank account or a problem with the card). The bank returns the refunded amount to us and we add it back to your Balance. This process can take up to 30 days from the post date.

Possible values: "succeeded", "pending", or "failed"
updated_at
datetime

The ISO 8601 datetime at which the Refund was updated

Example: "2020-04-11T15:48:11.642Z"

Preview

This is not yet finalised. It may change or be removed or be not yet accessible. This documentation is designed to give you an idea of features we'll be adding to our API in the future.

You should use this API to get the complete, up-to-date information about a Refund.

URL parameters

id
string
required

Duffel's unique identifier for the Refund

Example: "ref_00009hthhsUZ8W4LxQgkjo"

Preview

This is not yet finalised. It may change or be removed or be not yet accessible. This documentation is designed to give you an idea of features we'll be adding to our API in the future.

Endpoint

GET https://api.duffel.com/payments/refunds/{id}

Request

curl -X GET --compressed "https://api.duffel.com/payments/refunds/{id}" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Duffel-Version: v1" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"

Response

{
"data": {
"updated_at": "2020-04-11T15:48:11.642Z",
"status": "succeeded",
"payment_intent_id": "pit_00009hthhsUZ8W4LxQgkjo",
"net_currency": "GBP",
"net_amount": "300.10",
"live_mode": true,
"id": "ref_00009hthhsUZ8W4LxQgkjo",
"destination": "original_form_of_payment",
"currency": "GBP",
"created_at": "2020-04-11T15:48:11.642Z",
"arrival": "Credit approximately 5-10 business days later, depending upon the bank.",
"amount": "300.10"
}
}

Preview

This is not yet finalised. It may change or be removed or be not yet accessible. This documentation is designed to give you an idea of features we'll be adding to our API in the future.

Create a Refund to refund some money to a customer that they paid using a Payment Intent. You must specify the amount and currency. The currency is currently limited to the currency in which the Payment Intent was made.

Body parameters

amount
string
required

This amount that will be refunded to the customer's card.

Example: "30.20"
currency
string
required

The currency of the amount, as an ISO 4217 currency code.

It must match the Payment Intent currency.

Example: "GBP"
payment_intent_id
string
required

Duffel's unique identifier for the Payment Intent that the Refund is for

Example: "pit_00009hthhsUZ8W4LxQgkjo"

Preview

This is not yet finalised. It may change or be removed or be not yet accessible. This documentation is designed to give you an idea of features we'll be adding to our API in the future.

Endpoint

POST https://api.duffel.com/payments/refunds

Request

curl -X POST --compressed "https://api.duffel.com/payments/refunds" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Duffel-Version: v1" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-d '{
"data": {
"payment_intent_id": "pit_00009hthhsUZ8W4LxQgkjo",
"currency": "GBP",
"amount": "30.20"
}
}'

Response

{
"data": {
"updated_at": "2020-04-11T15:48:11.642Z",
"status": "succeeded",
"payment_intent_id": "pit_00009hthhsUZ8W4LxQgkjo",
"net_currency": "GBP",
"net_amount": "300.10",
"live_mode": true,
"id": "ref_00009hthhsUZ8W4LxQgkjo",
"destination": "original_form_of_payment",
"currency": "GBP",
"created_at": "2020-04-11T15:48:11.642Z",
"arrival": "Credit approximately 5-10 business days later, depending upon the bank.",
"amount": "300.10"
}
}