Skip to main content

Initialize P2P Session

POST 

/sessions

Production URL:

https://api.x-link.asia/api/v1/p2p/sessions

Initializes a new session for a P2P operation. Publicly accessible.

Request

Metadata Field

The metadata field contains additional data for the payment provider. The structure and required fields depend on the operation type.

PAYIN Operations

For PAYIN operations, the metadata field is optional. All fields are optional and default values are used if not specified.

Optional Fields:

  • bank_code (string, optional) - Bank code (e.g., "ALLVA.ID"). If not specified, the default for the currency is used
  • customer_name (string, optional) - Payer's first name. Default: "Customer"
  • customer_lastname (string, optional) - Payer's last name

Example:

{
"bank_code": "ALLVA.ID",
"customer_name": "John",
"customer_lastname": "Doe",
"ref1": "invoice-12345"
}

PAYOUT Operations

For PAYOUT operations, the metadata field is required. All required fields must be filled with recipient's details.

Required Fields:

  • account_number (string, required) - Recipient's bank account number
  • account_name (string, required) - Account holder's name (as registered with the bank)
  • bank_province (string, required) - Bank province/region
  • bank_city (string, required) - Bank city
  • bank_code (string, required) - Bank code (e.g., "ALLVA.ID")

Optional Fields:

  • bank_branch (string, optional) - Bank branch address
  • customer_name (string, optional) - Customer's first name
  • customer_lastname (string, optional) - Customer's last name

Example:

{
"account_number": "1234567890",
"account_name": "John Doe",
"bank_province": "Jakarta",
"bank_city": "Jakarta Selatan",
"bank_code": "ALLVA.ID",
"bank_branch": "Jl. Sudirman No. 123"
}

Responses

Session created successfully