Skip to main content
POST
Create payment code

Authorizations

Authorization
string
header
required

JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.

X-PARTNER-ID
string
header
required

Merchant API key (Credential.api_key). Required on every request.

Path Parameters

account_id
string
required

Account identifier in ULID format.

Body

application/json
retail_code
enum<string>
required

Which retail outlet the customer will pay at.

Available options:
ALFAMART,
INDOMARET
Example:

"ALFAMART"

amount
number
required

Payment amount. Min/max come from merchant configuration (defaults: Rp 15,000 – Rp 2,500,000).

Example:

50000

customer_name
string
required
Maximum string length: 255
Example:

"John Doe"

expired_at
integer
required

Expiry as a unix timestamp in milliseconds (13 digits). Must be in the future.

Example:

1787969413000

merchant_reff_no
string | null
Maximum string length: 255
Example:

"INV-2026-001"

customer_id
string | null
Maximum string length: 255
Example:

"CUST-001"

customer_email
string<email> | null
Maximum string length: 255
Example:

"john.doe@example.com"

customer_phone
string | null
Maximum string length: 20
Example:

"081234567890"

Response

Payment code created

status
integer
required
Example:

200

success
boolean
required
Example:

true

data
object
required

Retail Store transaction resource (RetailTransactionTransformer).