Singapay Home Page
Logo Icon
  1. Card (Money In)
  2. Payment (One-Time)

Information

MethodPathFormatAuthentication
POST/api/v2.0/card/{account_id}/paymentjsonOAuth 2.0 with Access Token

Processes one-time payment (full or installment) in a single request. Aligned with Payment Linking processOneTime request/response model.


Request Details

Headers Structure

FieldValueTypeMandatoryDescriptionExample
AuthorizationBearer {access_token}AlphanumericMandatoryBearer token obtained from the access token endpoint.Bearer eyJ0eXAiOiJKV1{…}
Content-Typeapplication/jsonAlphabeticMandatorySpecifies JSON as the request body format.application/json

Path Parameters

ParameterTypeMandatoryDescriptionExample
account_idStringRequiredMerchant Account ULID01K5G4FZZ18DMK0M5QTR8Y9QY9

Body Structure

ParameterTypeMandatoryValidationDescriptionExample
amountNumberRequiredmin: 5000, max: 999999999Transaction amount in IDR100000
goods_nameStringRequiredmax: 255Product or service namePremium Subscription
customer_nameStringRequiredmax: 255Customer billing nameJohn Doe
customer_emailStringRequiredemail, max: 255Customer email addressjohn@example.com
customer_phoneStringRequiredmax: 50Customer phone number08123456789
customer_addressStringRequiredmax: 500Billing addressJl. Sudirman No. 1
customer_cityStringRequiredmax: 100CityJakarta
customer_stateStringRequiredmax: 100State or ProvinceDKI Jakarta
customer_postal_codeStringRequiredmax: 20Postal code10210
customer_countryStringRequiredsize: 2ISO country code (e.g. ID)ID
card_numberStringRequiredmax: 20Card number (no spaces)4111111111111111
card_expiryStringRequiredsize: 4Expiry in YYMM format (e.g. 2512)2512
card_cvvStringRequiredmax: 4CVV/CVC code123
card_holder_nameStringRequiredmax: 45Cardholder nameJohn Doe
card_holder_emailStringRequiredemail, max: 100Cardholder email addressjohn@example.com
reference_noStringOptionalmax: 100Merchant order reference. Auto-generated if omittedORD-20260225-001
descriptionStringOptionalmax: 500Transaction descriptionMonthly subscription fee
installmentBooleanOptional-true for installment paymentfalse
installment_monthStringOptional3, 6, 12Installment period (default: 3 when installment is true)3

Request Example

{
    "amount": 100000,
    "goods_name": "Premium Subscription",
    "customer_name": "John Doe",
    "customer_email": "john@example.com",
    "customer_phone": "08123456789",
    "customer_address": "Jl. Sudirman No. 1",
    "customer_city": "Jakarta",
    "customer_state": "DKI Jakarta",
    "customer_postal_code": "10210",
    "customer_country": "ID",
    "reference_no": "ORD-20260225-001",
    "card_number": "4111111111111111",
    "card_expiry": "2512",
    "card_cvv": "123",
    "card_holder_name": "John Doe",
    "card_holder_email": "john@example.com",
    "description": "Monthly subscription fee"
}

cURL Example:

curl -X POST "https://your-domain.com/api/v2.0/card/01K5G4FZZ18DMK0M5QTR8Y9QY9/payment" \
  -H "X-PARTNER-ID: {api_key}" \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100000,
    "goods_name": "Premium Subscription",
    "customer_name": "John Doe",
    "customer_email": "john@example.com",
    "customer_phone": "08123456789",
    "customer_address": "Jl. Sudirman No. 1",
    "customer_city": "Jakarta",
    "customer_state": "DKI Jakarta",
    "customer_postal_code": "10210",
    "customer_country": "ID",
    "reference_no": "ORD-20260225-001",
    "card_number": "4111111111111111",
    "card_expiry": "2512",
    "card_cvv": "123",
    "card_holder_name": "John Doe",
    "card_holder_email": "john@example.com",
    "description": "Monthly subscription fee"
  }'

Response Details

Response Structure

FieldTypeMandatoryDescriptionExample
response_codeStringMandatoryResponse codeSP000
response_messageStringMandatoryHuman-readable response messageSuccessfully
dataObjectMandatoryResponse data-
> transaction_idStringMandatoryTransaction ID (format: 99 + ULID)9901JAB3CD4E5F6G7H8J9K0M1N2
> reference_noStringMandatoryMerchant order reference numberORD-20260225-001
> statusStringMandatoryTransaction statusprocessing
> actionStringMandatorycomplete (immediate) or redirect (3DS required)complete
> immediate_successBooleanConditionaltrue when payment succeeded immediately without 3DStrue
> provider_transaction_idStringConditionalTransaction reference (present on immediate success)IONPAYTEST01202602251234567890
> provider_auth_noStringConditionalAuthorization number (present on immediate success)123456
> card_maskedStringConditionalMasked card number (present on immediate success)411111******1111
> issuing_bankStringConditionalIssuing bank name (present on immediate success)CIMB
> acquiring_bankStringConditionalAcquiring bank name (present on immediate success)CIMB
> result_codeStringConditionalResult code (present on immediate success)0000
> requires_3dsBooleanConditionaltrue when 3DS authentication is requiredtrue
> payment_urlStringConditionalHTML content for 3DS redirect (when requires_3ds is true)<html>…</html>
> html_formStringConditionalHTML form for 3DS redirect (when requires_3ds is true)<html>…</html>

Response Example — Immediate Success (HTTP 200)

When 3DS is not required, the payment completes immediately:

Success: Payment completed immediately.

{
    "response_code": "SP000",
    "response_message": "Successfully",
    "data": {
        "transaction_id": "9901JAB3CD4E5F6G7H8J9K0M1N2",
        "reference_no": "ORD-20260225-001",
        "status": "processing",
        "action": "complete",
        "immediate_success": true,
        "provider_transaction_id": "IONPAYTEST01202602251234567890",
        "provider_auth_no": "123456",
        "card_masked": "411111******1111",
        "issuing_bank": "CIMB",
        "acquiring_bank": "CIMB",
        "result_code": "0000"
    }
}

Response Example — 3DS Required (HTTP 200)

When the issuing bank requires 3DS authentication:

Success: 3DS redirect required. Render the payment_url or html_form for the customer.

{
    "response_code": "SP000",
    "response_message": "Successfully",
    "data": {
        "transaction_id": "9901JAB3CD4E5F6G7H8J9K0M1N2",
        "reference_no": "ORD-20260225-001",
        "status": "pending",
        "action": "redirect",
        "requires_3ds": true,
        "payment_url": "<html>...</html>",
        "html_form": "<html>...</html>",
        "provider_transaction_id": "IONPAYTEST01202602251234567890"
    }
}

Error Response (HTTP 400)

Error: Payment declined.

{
    "response_code": "SP001",
    "response_message": "Payment declined by issuer",
    "data": {
        "transaction_id": "9901JAB3CD4E5F6G7H8J9K0M1N2",
        "reference_no": "ORD-20260225-001",
        "status": "failed"
    }
}

3DS Handling

When the response includes action: "redirect" and requires_3ds: true:

  1. Render the form: Insert the payment_url or html_form HTML content into a hidden form element or iframe on your page.
  2. Auto-submit: The form will auto-submit and redirect the customer to the bank’s 3DS authentication page.
  3. Completion: After the customer completes 3DS authentication, the bank’s 3DS page will redirect back to complete the flow, and your webhook may be called on completion.
  4. Verify status: Use the Inquiry Status endpoint to confirm the final payment result.

3DS handling: Render payment_url or html_form in a hidden form and auto-submit, or display in an iframe. The bank’s 3DS page will redirect back to complete the flow, and your webhook may be called on completion.


Installment Reference

Installment Type Reference

ValueDescription
1Full payment
2Installment

Installment Month Options

ValueDescription
11 month
33 months
66 months
1212 months

Important Notes

  • Single-Step Payment: This endpoint handles the full payment flow in one request — no separate registration step is needed.
  • Required Customer Data: Customer email, phone, address, city, state, postal code, country, and cardholder email are all required.
  • Card Data: Card number, expiry, CVV, and cardholder name are all required. The card number must be sent without spaces or dashes.
  • Expiry Format: The expiry date uses YYMM format (e.g., 2512 for December 2025), not the more common MMYY format.
  • Action Field: Check the action field to determine if the payment completed immediately (complete) or requires 3DS redirect (redirect).
  • Final Status: After payment submission, use Inquiry Status or wait for a webhook to confirm the final outcome (success or failed).