Xendit

App · 12 actions

Look up balances, customers and payment activity in Xendit.

Actions

ActionWhat it does
Cancel payment requestCancel payment request.
Create customerMake a POST request to this endpoint to create a customer for later use with a payments endpoint.
Get balanceGet the current balance of a Xendit account.
Get customerRetrieves a single customer object
Get payment requestGet payment request status
Get payoutRetrieve a specific created Payout with a given ID
Get refundRetrieve a refund's details and current status using the refund_id returned when you created it.
Get transactionGet a transaction by its Xendit ID.
List customersRetrieves an array with a customer object that matches the provided reference_id - the identifier provided by you The Customer Object is a standard data structure to hold information relating to one of your customers.
List refundsRetrieve refunds for a V3 payment using its payment_id (py- prefix).
List transactionsList transactions in your Xendit account.
Update customerMake a PATCH request to this endpoint to update the details on a customer.

Cancel payment request

Cancel payment request. Prevents end users from completing payment.

Inputs

Payment request IDpayment_request_idtextRequired
Payment request ID.

Outputs

dataobject
Payment request object
Example output
{
  "data": {
    "actions": [],
    "business_id": "example",
    "capture_method": "AUTOMATIC",
    "channel_code": "example",
    "channel_properties": {},
    "country": "ID",
    "created": "example",
    "currency": "IDR",
    "customer_id": "example",
    "description": "example",
    "failure_code": "ACCOUNT_ACCESS_BLOCKED",
    "latest_payment": {
      "business_id": "example",
      "capture_method": "AUTOMATIC",
      "captures": [],
      "channel_code": "example",
      "country": "ID",
      "created": "example",
      "currency": "IDR",
      "customer_id": "example",
      "failure_code": "ACCOUNT_ACCESS_BLOCKED",
      "metadata": {},
      "payment_details": {
        "authentication_data": {
          "a_res": {},
          "flow": "FULL_AUTH"
        },
        "authorization_data": {
          "acquirer_merchant_id": "example",
          "address_verification_result": "M",
          "authorization_code": "example",
          "cvn_verification_result": "M",
          "network_response_code": "example",
          "network_response_code_descriptor": "example",
          "network_transaction_id": "example",
          "reconciliation_id": "example",
          "retrieval_reference_number": "example",
          "transaction_link_id": "example"
        },
        "digital_wallet": "example",
        "fund_source": "example",
        "issuer_name": "example",
        "network": "example",
        "payer_account_number": "example",
        "payer_name": "example",
        "receipt_id": "example",
        "remark": "example"
      },
      "payment_id": "example",
      "payment_request_id": "example",
      "payment_token_id": "example",
      "reference_id": "example",
      "request_amount": 1.0,
      "status": "AUTHORIZED",
      "type": "PAY",
      "updated": "example"
    },
    "latest_payment_id": "example",
    "metadata": {},
    "payment_request_id": "example",
    "payment_token_id": "example",
    "reference_id": "example",
    "request_amount": 1.0,
    "status": "ACCEPTING_PAYMENTS",
    "type": "PAY",
    "updated": "example"
  }
}

Create customer

Make a POST request to this endpoint to create a customer for later use with a payments endpoint. The Customer Object is a standard data structure to hold information relating to one of your customers. It has the following major components: - A Type of customer (Individual or Business) - Basic descriptive details of that customer - Addresses of the customer - Identity accounts and KYC documents to prove the legitimacy of the customer - Other metadata

Inputs

Reference IDreference_idtextRequired
A Reference ID from merchants to identify their request.
TypetypetextRequired
Type of customerOne of: INDIVIDUAL, BUSINESS.
Individual detailindividual_detailobject
JSON object containing details of the Individual. Required if type is `INDIVIDUAL`
Business detailbusiness_detailobject
JSON object containing details of the business. Required if type is `BUSINESS`
Mobile numbermobile_numbertext
Supports both E.164 international format (+ ) and local formats with or without a leading zero.
Phone numberphone_numbertext
Supports both E.164 international format (+ ) and local formats with or without a leading zero.
Emailemailtext
E-mail address of customer
Addressesaddressesobject
Addresses.
Kyc documentskyc_documentslist
Kyc documents.
Descriptiondescriptiontext
Merchant-provided description for the customer. `Characters` alphanumeric. No special characters is allowed.
Date of registrationdate_of_registrationdate
Business registration date
Domicile of registrationdomicile_of_registrationtext
Country within which the account that the shopper had to create/sign up on the merchant's website resides (e.g. accounts created on Shopee SG have `SG` as the value for this field. ISO 3166-2 Country Code
Metadatametadataobject
Object of additional information related to the customer. Define the JSON properties and values as required to pass information through the APIs. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. This is only for your use and will not be used by Xendit.

Outputs

dataobject
Customer Object
Example output
{
  "data": {
    "addresses": [],
    "business_detail": {
      "business_domicile": "example",
      "business_name": "example",
      "business_type": "SOLE_PROPRIETOR",
      "date_of_registration": "example",
      "nature_of_business": "example",
      "trading_name": "example"
    },
    "created": "example",
    "date_of_registration": "example",
    "description": "example",
    "domicile_of_registration": "example",
    "email": "example",
    "hashed_phone_number": "example",
    "id": "example",
    "identity_accounts": [],
    "individual_detail": {
      "date_of_birth": "example",
      "employment": {
        "employer_name": "example",
        "nature_of_business": "example",
        "role_description": "example"
      },
      "gender": "MALE",
      "given_names": "example",
      "nationality": "example",
      "place_of_birth": "example",
      "surname": "example"
    },
    "kyc_documents": [],
    "metadata": {},
    "mobile_number": "example",
    "phone_number": "example",
    "reference_id": "example",
    "type": "INDIVIDUAL",
    "updated": "example"
  }
}

Get balance

Get the current balance of a Xendit account.

Inputs

Account typeaccount_typetext
Account type.One of: CASH, HOLDING.
At timestampat_timestampdate and time
At timestamp.
Currencycurrencytext
Currency.One of: IDR, PHP, USD, VND, THB, MYR, SGD, EUR, GBP, HKD, AUD.

Outputs

dataobject
The response from Xendit.
Example output
{
  "data": {
    "balance": 1.0
  }
}

Get customer

Retrieves a single customer object

Inputs

Customer IDcustomer_idtextRequired
Your identifier for the customer

Outputs

dataobject
Customer Object
Example output
{
  "data": {
    "addresses": [],
    "business_detail": {
      "business_domicile": "example",
      "business_name": "example",
      "business_type": "SOLE_PROPRIETOR",
      "date_of_registration": "example",
      "nature_of_business": "example",
      "trading_name": "example"
    },
    "created": "example",
    "date_of_registration": "example",
    "description": "example",
    "domicile_of_registration": "example",
    "email": "example",
    "hashed_phone_number": "example",
    "id": "example",
    "identity_accounts": [],
    "individual_detail": {
      "date_of_birth": "example",
      "employment": {
        "employer_name": "example",
        "nature_of_business": "example",
        "role_description": "example"
      },
      "gender": "MALE",
      "given_names": "example",
      "nationality": "example",
      "place_of_birth": "example",
      "surname": "example"
    },
    "kyc_documents": [],
    "metadata": {},
    "mobile_number": "example",
    "phone_number": "example",
    "reference_id": "example",
    "type": "INDIVIDUAL",
    "updated": "example"
  }
}

Get payment request

Get payment request status

Inputs

Payment request IDpayment_request_idtextRequired
Payment request ID.

Outputs

dataobject
Payment request object
Example output
{
  "data": {
    "actions": [],
    "business_id": "example",
    "capture_method": "AUTOMATIC",
    "channel_code": "example",
    "channel_properties": {},
    "country": "ID",
    "created": "example",
    "currency": "IDR",
    "customer_id": "example",
    "description": "example",
    "failure_code": "ACCOUNT_ACCESS_BLOCKED",
    "latest_payment": {
      "business_id": "example",
      "capture_method": "AUTOMATIC",
      "captures": [],
      "channel_code": "example",
      "country": "ID",
      "created": "example",
      "currency": "IDR",
      "customer_id": "example",
      "failure_code": "ACCOUNT_ACCESS_BLOCKED",
      "metadata": {},
      "payment_details": {
        "authentication_data": {
          "a_res": {},
          "flow": "FULL_AUTH"
        },
        "authorization_data": {
          "acquirer_merchant_id": "example",
          "address_verification_result": "M",
          "authorization_code": "example",
          "cvn_verification_result": "M",
          "network_response_code": "example",
          "network_response_code_descriptor": "example",
          "network_transaction_id": "example",
          "reconciliation_id": "example",
          "retrieval_reference_number": "example",
          "transaction_link_id": "example"
        },
        "digital_wallet": "example",
        "fund_source": "example",
        "issuer_name": "example",
        "network": "example",
        "payer_account_number": "example",
        "payer_name": "example",
        "receipt_id": "example",
        "remark": "example"
      },
      "payment_id": "example",
      "payment_request_id": "example",
      "payment_token_id": "example",
      "reference_id": "example",
      "request_amount": 1.0,
      "status": "AUTHORIZED",
      "type": "PAY",
      "updated": "example"
    },
    "latest_payment_id": "example",
    "metadata": {},
    "payment_request_id": "example",
    "payment_token_id": "example",
    "reference_id": "example",
    "request_amount": 1.0,
    "status": "ACCEPTING_PAYMENTS",
    "type": "PAY",
    "updated": "example"
  }
}

Get payout

Retrieve a specific created Payout with a given ID

Inputs

Payout IDpayout_idtextRequired
Payout ID.

Outputs

dataobject
Payout Object
Example output
{
  "data": {
    "business_id": "example",
    "created": "example",
    "description": "example",
    "destination_amount": 1,
    "destination_currency": "USD",
    "estimated_arrival_time": "example",
    "failure_code": "INSUFFICIENT_BALANCE",
    "metadata": {},
    "payout_id": "example",
    "processor_reference": "example",
    "purpose_code": "SELF",
    "receipt_notification": {
      "email_bcc": [],
      "email_cc": [],
      "email_to": []
    },
    "recipient": {
      "account_details": {
        "account_country": "example",
        "account_holder_name": "example",
        "account_number": "example",
        "account_type": "CHECKING",
        "currency": "example",
        "routing_type_1": "SWIFT",
        "routing_type_2": "example",
        "routing_value_1": "example",
        "routing_value_2": "example"
      },
      "address": {
        "city": "example",
        "country": "example",
        "postal_code": "example",
        "province_state": "example",
        "street_line_1": "example",
        "street_line_2": "example"
      },
      "business_name": "example",
      "details": {
        "business_phone_number": "example",
        "country_of_birth": "example",
        "date_of_birth": "example",
        "date_of_incorporation": "example",
        "gender": "MALE",
        "nationality": "example",
        "nature_of_business": "example",
        "occupation": "example",
        "personal_email": "example",
        "personal_id_country": "example",
        "personal_id_expiration_date": "example",
        "personal_id_type": "BIRTH_CERTIFICATE",
        "personal_id_value": "example",
        "personal_mobile_number": "example",
        "registration_number": "example"
      },
      "given_name": "example",
      "given_name_non_roman": "example",
      "relationship": "BRANCH_REPRESENTATIVE_OFFICE",
      "surname": "example",
      "surname_non_roman": "example",
      "type": "INDIVIDUAL"
    },
    "reference_id": "example",
    "sender": {
      "address": {
        "city": "example",
        "country": "example",
        "postal_code": "example",
        "province_state": "example",
        "street_line_1": "example",
        "street_line_2": "example"
      },
      "business_name": "example",
      "details": {
        "business_phone_number": "example",
        "country_of_birth": "example",
        "date_of_birth": "example",
        "date_of_incorporation": "example",
        "gender": "MALE",
        "nationality": "example",
        "nature_of_business": "example",
        "occupation": "example",
        "personal_email": "example",
        "personal_id_country": "example",
        "personal_id_expiration_date": "example",
        "personal_id_type": "BIRTH_CERTIFICATE",
        "personal_id_value": "example",
        "personal_mobile_number": "example",
        "registration_number": "example"
      },
      "given_name": "example",
      "given_name_non_roman": "example",
      "surname": "example",
      "surname_non_roman": "example",
      "type": "INDIVIDUAL"
    },
    "source_amount": 1,
    "source_currency": "USD",
    "source_of_fund": "INVESTMENT",
    "status": "ACCEPTED",
    "type": "B2B",
    "underlying_documents": [],
    "updated": "example"
  }
}

Get refund

Retrieve a refund's details and current status using the refund_id returned when you created it. Refund IDs from the legacy /refunds API are not supported.

Inputs

Refund IDrefund_idtextRequired
Refund ID returned when creating a V3 refund.

Outputs

dataobject
Details and current status of a V3 refund.
Example output
{
  "data": {
    "amount": 1.0,
    "business_id": "example",
    "channel_code": "example",
    "created": "example",
    "currency": "IDR",
    "failure_code": "example",
    "metadata": {},
    "payment_id": "example",
    "reason": "FRAUDULENT",
    "reference_id": "example",
    "refund_details": {
      "acquirer_reference_id": "example"
    },
    "refund_id": "example",
    "status": "SUCCEEDED",
    "updated": "example"
  }
}

Get transaction

Get a transaction by its Xendit ID.

Inputs

Transaction IDtransaction_idtextRequired
Transaction ID.

Outputs

dataobject
The response from Xendit.
Example output
{
  "data": {
    "amount": 1.0,
    "created": "example",
    "currency": "example",
    "id": "example",
    "product_id": "example",
    "reference_id": "example",
    "status": "example",
    "type": "example"
  }
}

List customers

Retrieves an array with a customer object that matches the provided reference_id - the identifier provided by you The Customer Object is a standard data structure to hold information relating to one of your customers. It has the following major components: - A Type of customer (Individual or Business) - Basic descriptive details of that customer - Addresses of the customer - Identity accounts and KYC documents to prove the legitimacy of the customer - Other metadata

Inputs

Reference IDreference_idtextRequired
Your identifier for the customer

Outputs

dataobject
List of customer object
Example output
{
  "data": {
    "data": [],
    "has_more": false
  }
}

List refunds

Retrieve refunds for a V3 payment using its payment_id (py- prefix). Legacy payment IDs are not supported by this endpoint. The response is an array of refund objects.

Inputs

Payment IDpayment_idtextRequired
V3 payment ID whose refunds you want to retrieve.

Outputs

datalist
The response from Xendit.
Example output
{
  "data": []
}

List transactions

List transactions in your Xendit account.

Inputs

Limitlimitnumber
Limit.From 1 to 100.
After IDafter_idtext
After ID.
Before IDbefore_idtext
Before ID.
Created gtecreated_gtedate and time
Created gte.
Created ltecreated_ltedate and time
Created lte.
Updated gteupdated_gtedate and time
Updated gte.
Updated lteupdated_ltedate and time
Updated lte.
Statusesstatuseslist
Statuses.One or more of: PENDING, SUCCESS, FAILED, VOIDED, REVERSED.
Typestypeslist
Types.One or more of: PAYMENT, REFUND, DISBURSEMENT, TRANSFER_IN (Transfer in), TRANSFER_OUT (Transfer out), ADJUSTMENT_ADD (Adjustment add), ADJUSTMENT_DEDUCT (Adjustment deduct), BNPL_PARTNER_SETTLEMENT_CREDIT (Bnpl partner settlement credit), BNPL_PARTNER_SETTLEMENT_DEBIT (Bnpl partner settlement debit), CASHBACK_FEE (Cashback fee), and 15 more.

Outputs

dataobject
The response from Xendit.
Example output
{
  "data": {
    "data": [],
    "has_more": false
  }
}

Update customer

Make a PATCH request to this endpoint to update the details on a customer. Only fields present in the request will be updated. Any changes to fields on the customer object will replace that item in its entirety. If you wish to append to an array, your PATCH request should contain the desired end state array (i.e., both the current content and the new array element to append to it). Pass a NULL value to remove the existing content. Note that the reference_id and type on a customer cannot be updated.

Inputs

Customer IDcustomer_idtextRequired
Your identifier for the customer
Individual detailindividual_detailobject
JSON object containing details of the Individual. Required if type is `INDIVIDUAL`
Business detailbusiness_detailobject
JSON object containing details of the business. Required if type is `BUSINESS`
Mobile numbermobile_numbertext
Supports both E.164 international format (+ ) and local formats with or without a leading zero.
Phone numberphone_numbertext
Supports both E.164 international format (+ ) and local formats with or without a leading zero.
Emailemailtext
E-mail address of customer
Addressesaddressesobject
Addresses.
Kyc documentskyc_documentslist
Kyc documents.
Descriptiondescriptiontext
Merchant-provided description for the customer. `Characters` alphanumeric. No special characters is allowed.
Date of registrationdate_of_registrationdate
Business registration date
Domicile of registrationdomicile_of_registrationtext
Country within which the account that the shopper had to create/sign up on the merchant's website resides (e.g. accounts created on Shopee SG have `SG` as the value for this field. ISO 3166-2 Country Code
Metadatametadataobject
Object of additional information related to the customer. Define the JSON properties and values as required to pass information through the APIs. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. This is only for your use and will not be used by Xendit.

Outputs

dataobject
Customer Object
Example output
{
  "data": {
    "addresses": [],
    "business_detail": {
      "business_domicile": "example",
      "business_name": "example",
      "business_type": "SOLE_PROPRIETOR",
      "date_of_registration": "example",
      "nature_of_business": "example",
      "trading_name": "example"
    },
    "created": "example",
    "date_of_registration": "example",
    "description": "example",
    "domicile_of_registration": "example",
    "email": "example",
    "hashed_phone_number": "example",
    "id": "example",
    "identity_accounts": [],
    "individual_detail": {
      "date_of_birth": "example",
      "employment": {
        "employer_name": "example",
        "nature_of_business": "example",
        "role_description": "example"
      },
      "gender": "MALE",
      "given_names": "example",
      "nationality": "example",
      "place_of_birth": "example",
      "surname": "example"
    },
    "kyc_documents": [],
    "metadata": {},
    "mobile_number": "example",
    "phone_number": "example",
    "reference_id": "example",
    "type": "INDIVIDUAL",
    "updated": "example"
  }
}

On this page