We refreshed our doc site!

Bookmarked links may have changed

Read release notes

refundPayment

Circle Mint

Refund a payment

POSThttps://api.circle.com/v1/payments/{id}/refund

The payment source will be refunded if possible. Not all payments are eligible to be cancelled.

A successful response does not mean the payment has been refunded; it only means the refund request is successfully submitted.

Path parameters
id
uuid
Required

Universally unique identifier (UUID v4) of a resource.

Body parameters
amount
object
Required
idempotencyKey
uuid
Required

Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests.

reason
string

Enumerated reason for a returned payment. Providing this reason in the request is recommended (to improve risk evaluation) but not required.

Response
RequestChoose a language
ResponseChoose an example
1{
2  "data": {
3    "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
4    "type": "refund",
5    "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
6    "merchantWalletId": "212000",
7    "amount": {
8      "amount": "3.14",
9      "currency": "USD"
10    },
11    "source": {
12      "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
13      "type": "card"
14    },
15    "description": "Payment",
16    "status": "pending",
17    "originalPayment": {
18      "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
19      "type": "payment",
20      "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
21      "merchantWalletId": "212000",
22      "amount": {
23        "amount": "3.14",
24        "currency": "USD"
25      },
26      "fromAmount": {
27        "amount": "3.14",
28        "currency": "USD"
29      },
30      "source": {
31        "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
32        "type": "card"
33      },
34      "description": "Payment",
35      "status": "pending",
36      "captured": false,
37      "captureAmount": {
38        "amount": "3.14",
39        "currency": "USD"
40      },
41      "captureDate": "2020-04-10T02:13:30.000Z",
42      "requiredAction": {
43        "type": "three_d_secure_required",
44        "redirectUrl": "https://example.org"
45      },
46      "cancel": {
47        "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
48        "type": "cancel",
49        "description": "Payment",
50        "status": "pending",
51        "createDate": "2020-04-10T02:13:30.000Z"
52      },
53      "refunds": [
54        {
55          "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
56          "type": "payment",
57          "amount": {
58            "amount": "3.14",
59            "currency": "USD"
60          },
61          "description": "Payment",
62          "status": "pending",
63          "requiredAction": {
64            "type": "three_d_secure_required",
65            "redirectUrl": "https://example.org"
66          },
67          "fees": {
68            "amount": "3.14",
69            "currency": "USD"
70          },
71          "createDate": "2020-04-10T02:13:30.000Z"
72        }
73      ],
74      "fees": {
75        "amount": "3.14",
76        "currency": "USD"
77      },
78      "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
79      "createDate": "2020-04-10T02:13:30.000Z",
80      "updateDate": "2020-04-10T02:13:30.000Z"
81    },
82    "cancel": {
83      "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
84      "type": "cancel",
85      "merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
86      "merchantWalletId": "212000",
87      "amount": {
88        "amount": "3.14",
89        "currency": "USD"
90      },
91      "source": {
92        "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
93        "type": "card"
94      },
95      "description": "Payment",
96      "status": "pending",
97      "originalPayment": {
98        "id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
99        "type": "payment",
100        "amount": {
101          "amount": "3.14",
102          "currency": "USD"
103        },
104        "description": "Payment",
105        "status": "pending",
106        "requiredAction": {
107          "type": "three_d_secure_required",
108          "redirectUrl": "https://example.org"
109        },
110        "fees": {
111          "amount": "3.14",
112          "currency": "USD"
113        },
114        "createDate": "2020-04-10T02:13:30.000Z"
115      },
116      "fees": {
117        "amount": "3.14",
118        "currency": "USD"
119      },
120      "channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
121      "createDate": "2020-04-10T02:13:30.000Z",
122      "updateDate": "2020-04-10T02:13:30.000Z"
123    },
124    "fees": {
125      "amount": "3.14",
126      "currency": "USD"
127    },
128    "trackingRef": "24910599141085313498894",
129    "errorCode": "payment_failed",
130    "metadata": {
131      "email": "[email protected]",
132      "phoneNumber": "+14155555555"
133    },
134    "riskEvaluation": {
135      "decision": "approved",
136      "reason": "3000"
137    },
138    "createDate": "2020-04-10T02:13:30.000Z",
139    "updateDate": "2020-04-10T02:13:30.000Z"
140  }
141}
Did this page help you?
© 2023-2024 Circle Technology Services, LLC. All rights reserved.