Purchases
Cancel a pending purchase
API Reference
- Purchases
- POSTCreate a purchase
- GETRetrieve a purchase
- POSTCancel a pending purchase
- POSTRelease funds on hold
- POSTCapture a previously authorized payment
- POSTCharge a purchase using a saved token
- POSTDelete a recurring token associated with a purchase
- POSTRefund a paid purchase
- POSTMark a purchase as paid
- POSTResend an invoice
- POST
- Payment methods
- Clients
- Webhooks
- Public key
- Account
- Company statements
Purchases
Cancel a pending purchase
POST
/
purchases
/
{id}
/
cancel
curl --request POST \
--url https://gate.chip-in.asia/api/v1/purchases/{id}/cancel/ \
--header 'Authorization: Bearer <token>'
{
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_on": 1619740800,
"updated_on": 1619740800,
"client": {
"bank_account": "<string>",
"bank_code": "<string>",
"email": "jsmith@example.com",
"phone": "+44 45643564564",
"full_name": "<string>",
"personal_code": "<string>",
"street_address": "<string>",
"country": "<string>",
"city": "<string>",
"zip_code": "<string>",
"state": "<string>",
"shipping_street_address": "<string>",
"shipping_country": "<string>",
"shipping_city": "<string>",
"shipping_zip_code": "<string>",
"shipping_state": "<string>",
"cc": [
"jsmith@example.com"
],
"bcc": [
"jsmith@example.com"
],
"legal_name": "<string>",
"brand_name": "<string>",
"registration_number": "<string>",
"tax_number": "<string>"
},
"purchase": {
"currency": "<string>",
"products": [
{
"name": "<string>",
"quantity": 1,
"price": 1,
"discount": 1,
"tax_percent": 0,
"category": "<string>"
}
],
"total": 123,
"language": "Default value is controlled in Company -> Brand section of merchant portal separately per each Brand used (default value, if no changes are made, is `en`). Brand to be used with corresponding Purchase/BillingTemplate specified using brand_id.",
"notes": "<string>",
"debt": 123,
"subtotal_override": 123,
"total_tax_override": 123,
"total_discount_override": 123,
"total_override": 123,
"request_client_details": [],
"timezone": "Europe/Oslo",
"due_strict": false,
"email_message": "<string>"
},
"payment": {
"is_outgoing": false,
"payment_type": "purchase",
"amount": 123,
"currency": "<string>",
"net_amount": 123,
"fee_amount": 123,
"pending_amount": 123,
"pending_unfreeze_on": 1619740800,
"description": "<string>",
"paid_on": 1619740800,
"remote_paid_on": 1619740800
},
"issuer_details": {
"website": "<string>",
"legal_street_address": "<string>",
"legal_country": "<string>",
"legal_city": "<string>",
"legal_zip_code": "<string>",
"bank_accounts": [
{
"bank_account": "<string>",
"bank_code": "<string>"
}
],
"legal_name": "<string>",
"brand_name": "<string>",
"registration_number": "<string>",
"tax_number": "<string>"
},
"transaction_data": {
"payment_method": "<string>",
"extra": {},
"country": "<string>",
"attempts": [
{
"type": "execute",
"successful": true,
"payment_method": "<string>",
"extra": {},
"country": "<string>",
"client_ip": "<string>",
"processing_time": 1619740800,
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
},
"status": "created",
"status_history": [
{
"status": "created",
"timestamp": 1619740800,
"related_object": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"viewed_on": 1619740800,
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_test": true,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_id": null,
"send_receipt": false,
"is_recurring_token": true,
"recurring_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_capture": false,
"force_recurring": false,
"reference_generated": "<string>",
"reference": "<string>",
"issued": "2020-04-30",
"due": 1619740800,
"refund_availability": "all",
"refundable_amount": 123,
"currency_conversion": {
"original_currency": "<string>",
"original_amount": 123,
"exchange_rate": 123
},
"payment_method_whitelist": [
"<string>"
],
"success_redirect": "<string>",
"failure_redirect": "<string>",
"cancel_redirect": "<string>",
"success_callback": "<string>",
"creator_agent": "<string>",
"platform": "web",
"product": "purchases",
"created_from_ip": "<string>",
"invoice_url": "<string>",
"checkout_url": "<string>",
"direct_post_url": "<string>",
"marked_as_paid": true,
"order_id": "<string>"
}
If you have a Purchase that payment is possible for, using this request you can guarantee that it won’t be paid.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Object ID (UUID)
Response
200
application/json
OK
Record of a single purchase operation, either a transaction originating from e-commerce integration or invoice sent. Has a status attribute, e.g. can be created
, paid
or refunded
.
curl --request POST \
--url https://gate.chip-in.asia/api/v1/purchases/{id}/cancel/ \
--header 'Authorization: Bearer <token>'
{
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_on": 1619740800,
"updated_on": 1619740800,
"client": {
"bank_account": "<string>",
"bank_code": "<string>",
"email": "jsmith@example.com",
"phone": "+44 45643564564",
"full_name": "<string>",
"personal_code": "<string>",
"street_address": "<string>",
"country": "<string>",
"city": "<string>",
"zip_code": "<string>",
"state": "<string>",
"shipping_street_address": "<string>",
"shipping_country": "<string>",
"shipping_city": "<string>",
"shipping_zip_code": "<string>",
"shipping_state": "<string>",
"cc": [
"jsmith@example.com"
],
"bcc": [
"jsmith@example.com"
],
"legal_name": "<string>",
"brand_name": "<string>",
"registration_number": "<string>",
"tax_number": "<string>"
},
"purchase": {
"currency": "<string>",
"products": [
{
"name": "<string>",
"quantity": 1,
"price": 1,
"discount": 1,
"tax_percent": 0,
"category": "<string>"
}
],
"total": 123,
"language": "Default value is controlled in Company -> Brand section of merchant portal separately per each Brand used (default value, if no changes are made, is `en`). Brand to be used with corresponding Purchase/BillingTemplate specified using brand_id.",
"notes": "<string>",
"debt": 123,
"subtotal_override": 123,
"total_tax_override": 123,
"total_discount_override": 123,
"total_override": 123,
"request_client_details": [],
"timezone": "Europe/Oslo",
"due_strict": false,
"email_message": "<string>"
},
"payment": {
"is_outgoing": false,
"payment_type": "purchase",
"amount": 123,
"currency": "<string>",
"net_amount": 123,
"fee_amount": 123,
"pending_amount": 123,
"pending_unfreeze_on": 1619740800,
"description": "<string>",
"paid_on": 1619740800,
"remote_paid_on": 1619740800
},
"issuer_details": {
"website": "<string>",
"legal_street_address": "<string>",
"legal_country": "<string>",
"legal_city": "<string>",
"legal_zip_code": "<string>",
"bank_accounts": [
{
"bank_account": "<string>",
"bank_code": "<string>"
}
],
"legal_name": "<string>",
"brand_name": "<string>",
"registration_number": "<string>",
"tax_number": "<string>"
},
"transaction_data": {
"payment_method": "<string>",
"extra": {},
"country": "<string>",
"attempts": [
{
"type": "execute",
"successful": true,
"payment_method": "<string>",
"extra": {},
"country": "<string>",
"client_ip": "<string>",
"processing_time": 1619740800,
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
},
"status": "created",
"status_history": [
{
"status": "created",
"timestamp": 1619740800,
"related_object": {
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"viewed_on": 1619740800,
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_test": true,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_id": null,
"send_receipt": false,
"is_recurring_token": true,
"recurring_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_capture": false,
"force_recurring": false,
"reference_generated": "<string>",
"reference": "<string>",
"issued": "2020-04-30",
"due": 1619740800,
"refund_availability": "all",
"refundable_amount": 123,
"currency_conversion": {
"original_currency": "<string>",
"original_amount": 123,
"exchange_rate": 123
},
"payment_method_whitelist": [
"<string>"
],
"success_redirect": "<string>",
"failure_redirect": "<string>",
"cancel_redirect": "<string>",
"success_callback": "<string>",
"creator_agent": "<string>",
"platform": "web",
"product": "purchases",
"created_from_ip": "<string>",
"invoice_url": "<string>",
"checkout_url": "<string>",
"direct_post_url": "<string>",
"marked_as_paid": true,
"order_id": "<string>"
}