curl --request POST \
--url https://service-sandbox.tazapay.com/v3/payin/{id}/cancel \
--header 'Authorization: Basic <encoded-value>'{
"status": "success",
"message": "",
"data": {
"amount": 100,
"amount_paid": 0,
"billing_details": {
"address": {
"city": "Singapore",
"country": "SG",
"line1": "1st Street",
"line2": "2nd Avenue",
"postal_code": "43004",
"state": "Singapore"
},
"label": "Home",
"name": "Andrea Lark",
"phone": {
"calling_code": "65",
"number": "87654321"
}
},
"cancel_url": "https://mystore.com/try_again",
"cancelled_at": "2024-10-07T07:25:36.425619061Z",
"client_token": "JsU19R_Li9cwVksJGUfAajZ3r2A9ArU7Qk3j5r0cpVg=",
"confirm": false,
"created_at": "2024-10-07T07:10:21.894488Z",
"customer": "cus_crtqrhth90j0121gpt50",
"customer_details": {
"country": "SG",
"email": "[email protected]",
"name": "Andrea Lark",
"phone": {
"calling_code": "65",
"number": "87654321"
}
},
"holding_currency": "INR",
"id": "pay_cs1oina7a5ng2a3ng12g",
"invoice_currency": "INR",
"items": [],
"latest_payment_attempt": "",
"latest_payment_attempt_data": null,
"metadata": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"object": "payin",
"paid_in_excess": false,
"partially_paid": false,
"payment_attempts": [],
"payment_method_details": {
"paynow_sgd": {},
"type": "paynow_sgd"
},
"reference_id": "string",
"shipping_details": {
"address": {
"city": "Singapore",
"country": "SG",
"line1": "1st Street",
"line2": "2nd Avenue",
"postal_code": "43004",
"state": "Singapore"
},
"label": "Home",
"name": "Andrea Lark",
"phone": {
"calling_code": "65",
"number": "87654321"
}
},
"statement_descriptor": "tzp*string",
"status": "cancelled",
"status_description": "",
"success_url": "https://mystore.com/success_page",
"transaction_data": [],
"transaction_description": "test",
"transaction_documents": [],
"webhook_url": "https://mystore.com/internal/webhook"
}
}curl --request POST \
--url https://service-sandbox.tazapay.com/v3/payin/{id}/cancel \
--header 'Authorization: Basic <encoded-value>'{
"status": "success",
"message": "",
"data": {
"amount": 100,
"amount_paid": 0,
"billing_details": {
"address": {
"city": "Singapore",
"country": "SG",
"line1": "1st Street",
"line2": "2nd Avenue",
"postal_code": "43004",
"state": "Singapore"
},
"label": "Home",
"name": "Andrea Lark",
"phone": {
"calling_code": "65",
"number": "87654321"
}
},
"cancel_url": "https://mystore.com/try_again",
"cancelled_at": "2024-10-07T07:25:36.425619061Z",
"client_token": "JsU19R_Li9cwVksJGUfAajZ3r2A9ArU7Qk3j5r0cpVg=",
"confirm": false,
"created_at": "2024-10-07T07:10:21.894488Z",
"customer": "cus_crtqrhth90j0121gpt50",
"customer_details": {
"country": "SG",
"email": "[email protected]",
"name": "Andrea Lark",
"phone": {
"calling_code": "65",
"number": "87654321"
}
},
"holding_currency": "INR",
"id": "pay_cs1oina7a5ng2a3ng12g",
"invoice_currency": "INR",
"items": [],
"latest_payment_attempt": "",
"latest_payment_attempt_data": null,
"metadata": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"object": "payin",
"paid_in_excess": false,
"partially_paid": false,
"payment_attempts": [],
"payment_method_details": {
"paynow_sgd": {},
"type": "paynow_sgd"
},
"reference_id": "string",
"shipping_details": {
"address": {
"city": "Singapore",
"country": "SG",
"line1": "1st Street",
"line2": "2nd Avenue",
"postal_code": "43004",
"state": "Singapore"
},
"label": "Home",
"name": "Andrea Lark",
"phone": {
"calling_code": "65",
"number": "87654321"
}
},
"statement_descriptor": "tzp*string",
"status": "cancelled",
"status_description": "",
"success_url": "https://mystore.com/success_page",
"transaction_data": [],
"transaction_description": "test",
"transaction_documents": [],
"webhook_url": "https://mystore.com/internal/webhook"
}
}requires_payment_method or requires_action. Upon cancellation, the status changes to cancelled.Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
ID of the already created payin
Was this page helpful?