Skip to main content
POST
/
payment-links
/
va
Create a VA payment link
curl --request POST \
  --url https://prod-api.pcxpay.com/v1/payment-links/va \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "virtual_account_id": "<string>",
  "payer_email": "jsmith@example.com",
  "payment_amount": 123,
  "description": "<string>"
}
'
{
  "link_id": "<string>",
  "org_id": "<string>",
  "email": "<string>",
  "link_ref": "<string>",
  "amount": 123,
  "currency": "<string>",
  "payer_currency": "<string>",
  "description": "<string>",
  "amount_type": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "paid_at": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string
default:NONE
required

Bearer JWT for user-facing flows (Bearer eyJraWQ...), or the literal string NONE when authenticating via API key.

Example:

"Bearer eyJraWQ..."

X-Api-Key
string
default:NONE
required

API key for server-to-server flows, or the literal string NONE when authenticating via JWT.

Example:

"pcx_abc123_xxxx"

Body

application/json
virtual_account_id
string
required
payer_email
string<email>
required
amount_type
enum<string>
required
Available options:
fixed,
flexible
payment_amount
number<float> | null

Required when amount_type is fixed.

description
string | null

Response

VA payment link created

org_id
string
email
string
amount
number<float> | null
currency
string | null
payer_currency
string | null
description
string | null
amount_type
string | null
status
enum<string>
Available options:
active,
expired,
completed
expires_at
string<date-time> | null
paid_at
string<date-time> | null
url
string<uri>
created_at
string<date-time>