Skip to main content
POST
/
api
/
v2.0
/
card
/
{account_id}
/
payment
Payment (One-Time)
curl --request POST \
  --url https://sandbox-payment-b2b.singapay.id/api/v2.0/card/{account_id}/payment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-PARTNER-ID: <api-key>' \
  --data '
{
  "amount": 150000,
  "goods_name": "Premium Subscription",
  "customer_name": "John Doe",
  "customer_email": "john.doe@example.com",
  "customer_phone": "081234567890",
  "customer_address": "Jl. Jenderal Sudirman No. 1",
  "customer_city": "Jakarta",
  "customer_state": "DKI Jakarta",
  "customer_postal_code": "10220",
  "customer_country": "ID",
  "card_number": "4000000000000002",
  "card_expiry": "0828",
  "card_cvv": "123",
  "card_holder_name": "JOHN DOE",
  "card_holder_email": "john.doe@example.com",
  "reference_no": "INV-2024-0012",
  "description": "Monthly premium plan payment",
  "installment": false,
  "installment_month": "3"
}
'
{
  "response_code": "SP000",
  "response_message": "Successfully",
  "data": {
    "transaction_id": "101222025010112000099887766",
    "reference_no": "INV-2024-0012",
    "status": "processing",
    "provider_transaction_id": "TXN202501011200001234",
    "provider_auth_no": "123456",
    "card_masked": "400000******0002",
    "issuing_bank": "BCA",
    "acquiring_bank": "BRI",
    "result_code": "0000",
    "action": "redirect",
    "requires_3ds": true,
    "payment_url": "https://secure-3ds.example.com/auth/..."
  }
}

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 ULID

Body

application/json

Request payload for a one-time card payment (full or installment). Customer billing details and card credentials are mandatory; installment fields are optional.

amount
number
required

Charge amount in IDR (whole number). Must be within the limits defined by config(default_money_in_out.min_card_amount|max_card_amount).

Example:

150000

goods_name
string
required

Name or description of the goods/service being purchased.

Maximum string length: 255
Example:

"Premium Subscription"

customer_name
string
required

Full name of the paying customer.

Maximum string length: 255
Example:

"John Doe"

customer_email
string<email>
required

Customer email address.

Maximum string length: 255
Example:

"john.doe@example.com"

customer_phone
string
required

Customer contact phone number.

Maximum string length: 50
Example:

"081234567890"

customer_address
string
required

Customer billing street address.

Maximum string length: 500
Example:

"Jl. Jenderal Sudirman No. 1"

customer_city
string
required

Customer billing city.

Maximum string length: 100
Example:

"Jakarta"

customer_state
string
required

Customer billing state or province.

Maximum string length: 100
Example:

"DKI Jakarta"

customer_postal_code
string
required

Customer billing postal code.

Maximum string length: 20
Example:

"10220"

customer_country
string
required

Customer country as a 2-letter ISO 3166-1 alpha-2 code.

Required string length: 2
Example:

"ID"

card_number
string
required

Card primary account number (PAN). Spaces are stripped before processing.

Maximum string length: 20
Example:

"4000000000000002"

card_expiry
string
required

Card expiry in MMYY format.

Required string length: 4
Example:

"0828"

card_cvv
string
required

Card verification value (CVV/CVC) printed on the card.

Maximum string length: 4
Example:

"123"

card_holder_name
string
required

Cardholder name as printed on the card.

Maximum string length: 45
Example:

"JOHN DOE"

card_holder_email
string<email>
required

Cardholder email address.

Maximum string length: 100
Example:

"john.doe@example.com"

reference_no
string | null

Merchant reference for the transaction. Auto-generated when omitted.

Maximum string length: 100
Example:

"INV-2024-0012"

description
string | null

Optional free-text note for the transaction.

Maximum string length: 500
Example:

"Monthly premium plan payment"

installment
boolean | null

Set to true to pay by installment. Defaults to false (full payment).

Example:

false

installment_month
enum<string> | null

Installment tenor in months. Required only when installment is true.

Available options:
3,
6,
12
Example:

"3"

Response

SP000 Successfully — payment accepted (may require 3-D Secure; check data.action).

Merchant v2 envelope returned on a successful one-time payment request (SP000, HTTP 200).

response_code
string
required

SingaPay custom business response code.

Example:

"SP000"

response_message
string
required

Human-readable label paired with response_code.

Example:

"Successfully"

data
object
required

Payload returned on a one-time payment request (CardPaymentMerchantApiService::mapPaymentResponseToV2). When the card requires 3-D Secure, action is redirect and the merchant must forward the customer to payment_url; otherwise action is complete.