We refreshed our doc site!

Bookmarked links may have changed

Read release notes

cancelPayment

Circle Mint

Cancel a payment

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

The payment will be voided if possible meaning the payment source will not be charged & the payment will never settle. Otherwise, the payment will be refunded meaning the payment source will be charged & the payment will be refunded from deductions of future settlements. Not all payments are eligible to be cancelled.

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

Path parameters
id
uuid
Required

Universally unique identifier (UUID v4) of a resource.

Body parameters
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": "cancel",
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    "fees": {
83      "amount": "3.14",
84      "currency": "USD"
85    },
86    "trackingRef": "24910599141085313498894",
87    "errorCode": "payment_failed",
88    "metadata": {
89      "email": "[email protected]",
90      "phoneNumber": "+14155555555"
91    },
92    "riskEvaluation": {
93      "decision": "approved",
94      "reason": "3000"
95    },
96    "refund": false,
97    "createDate": "2020-04-10T02:13:30.000Z",
98    "updateDate": "2020-04-10T02:13:30.000Z"
99  }
100}
Did this page help you?
© 2023-2024 Circle Technology Services, LLC. All rights reserved.