Refunds

We are currently not accepting new customers on to this product

If you have access to test mode, please check with your
Duffel contact that you’re able to use the product in
live mode before starting your integration.

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 resource

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.

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

URL parameters

id
stringrequired

Duffel's unique identifier for the resource

Example: "ref_00009hthhsUZ8W4LxQgkjo"

Preview

This is not yet finalised. It may change, or be removed or be not yet accessible.

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.

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
stringrequired

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

Example: "30.20"
currency
stringrequired

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

It must match the payment intent currency.

Example: "GBP"
payment_intent_id
stringrequired

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.

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"
}
}