Checkout Object

Checkout API object enables businesses to create and manage seamless online payment experiences. It lets you integrate a Tazapay-hosted payment page so that you can quickly collect cross-border payments on mobile and desktop devices.

Object Structure

{
  "id": "chk_cirsp2sl4ar024j0akj0",
  "object": "checkout",
  "invoice_currency": "USD",
  "amount": 100000,
  "amount_paid": 100000,
  "customer_details": {
      "country": "SG",
      "email": "[email protected]",
      "name": "Andrea Lark",
      "phone": {
        "calling_code": "65",
        "number": "87654321"
      }
    },
  "customer": "cus_afobaifawnf",
  "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"
      }
    },
  "customer_fee_percentage" : 0,
  "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"
      }
    },
  "success_url": "https://mystore.com/success_page",
  "cancel_url": "https://mystore.com/try_again",
  "webhook_url": "https://mystore.com/internal/webhook",
  "payment_methods": [
      "paynow_sgd", "card"
    ],
  "transaction_description": "1 x trousers",
  "expires_at": "2023-07-21T14:01:04.576356Z",
  "created_at": "2023-07-19T11:44:11.722049185Z",
  "url": "https://checkout.tazapay.com/transaction=ajfuibfainfaonfa",
  "payment_status": "paid",
  "payment_status_description": null,
  "status": "expired",
  "payin": "chk_cirsp2sl4ar024j0akj0",
  "payment_attempts": [{
      "id": "pat_ahbfiuahfiuaiofnioain",
      "object": "payment_attempt",
      "created_at": "2023-07-21T14:00:02.576356Z",
      "amount": 148000,
      "charge_currency": "SGD",
      "payin": "chk_cirsp2sl4ar024j0akj0",
      "payment_method_details": {
        "type": "paynow_sgd",
        "paynow_sgd": {}
      },
      "refunded": false,
      "status": "succeeded",
      "status_description": null,
      "final_currency": "USD",
      "fx_transaction": {
        "initial": {
          "currency": "SGD",
          "amount": 148000
        },
        "final": {
          "currency": "USD",
          "amount": 100000
        },
        "exchange_rate": 1.48
      },
      "metadata": null
    }],
  "latest_payment_attempt": "pat_ahbfiuahfiuaiofnioain",
  "partially_paid": false,
  "paid_in_excess": false,
  "transaction_documents": [],
  "reference_id": "mystore_order_00001",
  "metadata": {
      "key1": "value1",
      "key2": "value2",
      "key3": "value3"
    }
	}

Object Parameters

Checkout

FieldSubfieldTypeDescription
idstringThe Tazapay unique identifier for the checkout transaction.
objectstringThe type of object, which is "checkout".
invoice_currencystringThe currency of the invoice (e.g., USD).
amountnumberThe total amount to be paid.
amount_paidnumberThe amount that has already been paid.
customer_detailsobjectThe details of the customer.
countrystringThe country of the customer (e.g., SG for Singapore).
emailstringThe email address of the customer.
namestringThe name of the customer.
phoneobjectThe phone details of the customer. (See Phone Table)
customerstringThe customer ID related to the checkout.
billing_detailsobjectThe billing details of the customer.
addressobjectThe address details of the billing information. (See Address Table)
labelstringThe label for the billing address (e.g., Home, Office).
namestringThe name of the person being billed.
phoneobjectThe phone details for billing. (See Phone Table)
shipping_detailsobjectThe shipping details of the customer.
addressobjectThe address details of the shipping information. (See Address Table)
labelstringThe label for the shipping address (e.g., Home, Office).
namestringThe name of the person receiving the shipment.
phoneobjectThe phone details for shipping. (See Phone Table)
success_urlstringThe URL where the user is redirected after a successful transaction.
cancel_urlstringThe URL where the user is redirected after a cancelled transaction.
webhook_urlstringThe URL for webhook notifications regarding this transaction.
payment_methodsarrayThe list of payment methods available (e.g., paynow_sgd, card).
transaction_descriptionstringA description of the transaction (e.g., "1 x trousers").
expires_atstring (ISO Timestamp)The expiry date and time of the checkout session.
created_atstring (ISO Timestamp)The creation date and time of the checkout session.
urlstringThe URL for the checkout page.
payment_statusstringThe payment status of the transaction (e.g., paid, pending).
payment_status_descriptionstringAdditional details on the payment status
statusstringThe status of the checkout session (e.g., expired, active).
payinstringThe unique Tazapay ID of the related payin transaction.
payment_attemptsarrayThe list of payment attempts.
idstringThe unique Tazapay identifier for the payment attempt.
objectstringThe type of object, which is "payment_attempt".
created_atstringThe creation date and time of the payment attempt (ISO format).
amountnumberThe amount attempted to be paid.
charge_currencystringThe currency in which the charge was made (e.g., SGD).
payinstringThe ID of the related payin transaction.
payment_method_detailsobjectThe payment method used for the attempt. (See Payment Method Details Table)
refundedbooleanIndicates if the payment attempt was refunded.
statusstringThe status of the payment attempt (e.g., succeeded, failed).
status_descriptionstring/nullA description of the status (optional).
final_currencystringThe final currency after any conversion (e.g., USD).
fx_transactionobjectThe foreign exchange transaction details. (See FX Transaction Table)
latest_payment_attemptstringThe ID of the latest payment attempt.
partially_paidbooleanIndicates if the payment was partially paid.
paid_in_excessbooleanIndicates if the payment was made in excess.
transaction_documentsarrayList of transaction-related documents (if any).
reference_idstringThe reference ID for the transaction (e.g., "mystore_order_00001").
metadataobjectSet of key-value pairs attached to the checkout object.
customer_fee_percentageintegerCustomer fees percentage incase the fees is split between customer and merchant.

Address

FieldTypeDescription
citystringThe city of the billing or shipping address.
countrystringThe country of the billing or shipping address.
line1stringThe first line of the billing or shipping address.
line2stringThe second line of the billing or shipping address (optional).
postal_codestringThe postal code of the billing or shipping address.
statestringThe state or province of the billing or shipping address.

Phone

FieldTypeDescription
calling_codestringThe international calling code for the beneficiary's phone number.
numberstringThe phone number of the beneficiary.

Payment Method Details

FieldTypeDescription
typestringThe type of payment method used (e.g., paynow_sgd, card).
paynow_sgdobjectAdditional details specific to payment method

FX Transaction

FieldTypeDescription
exchange_ratenumberThe exchange rate used for the currency conversion.
final.amountnumberThe final amount after conversion.
final.currencystringThe final currency after conversion.
initial.amountnumberThe initial amount before conversion
initial.currencystringThe initial currency before conversion.
idstringThe Tazapay ID of the holding foreign exchange transaction.