### String to Sign Example Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/payment-link-inquiry Provides a concrete example of concatenating request components into a single string for signing. ```text Method: POST Endpoint: /webhook/payment-link-inquiry Access Token: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 Hashed Body: 5f4dcc3b5aa765d61d8327deb882cf99acd3d28e5cf0e661c02c8e8e6e8e6f9a Timestamp: 1695711945 StringToSign = POST:/webhook/payment-link-inquiry:a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6:5f4dcc3b5aa765d61d8327deb882cf99acd3d28e5cf0e661c02c8e8e6e8e6f9a:1695711945 ``` -------------------------------- ### cURL Request Example Source: https://docs-payment-b2b.singapay.id/docs/v1/card/payment Example of how to invoke the payment endpoint using cURL. ```bash 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" }' ``` -------------------------------- ### Payload String Example Source: https://docs-payment-b2b.singapay.id/docs/v1/security/get-access-tokenv11 A concrete example of the payload string construction. ```text Client ID = a2fca1f4-92f0-474d-a6d5-d92ca830be79 Client Secret = UAkHVDuPSqHQI17ED9vDXNHq9o6MfcSZ Timestamp = 20250921 Payload = a2fca1f4-92f0-474d-a6d5-d92ca830be79_UAkHVDuPSqHQI17ED9vDXNHq9o6MfcSZ_20250921 ``` -------------------------------- ### IP Whitelist Implementation Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/payment-link-inquiry Examples for restricting webhook access by IP address using Nginx and PHP. ```nginx location /webhook/payment-link-inquiry { # Only allow Singa Payment Gateway IPs allow 103.xxx.xxx.xxx; # Replace with actual IPs from Singa allow 103.xxx.xxx.xxx; # Replace with actual IPs from Singa deny all; proxy_pass http://your-backend; } ``` ```php 'error', 'message' => 'Access denied']); exit; } // Process webhook... ?> ``` -------------------------------- ### cURL Example for Filtering Payment Link History Source: https://docs-payment-b2b.singapay.id/docs/v1/payment-link-history/list This cURL command demonstrates how to make a GET request to filter payment link histories. It includes essential headers like X-PARTNER-ID, Accept, and Authorization. ```curl curl -X GET "https://api.singapay.id/api/v1.0/payment-link-histories/01K8AESCCKYSD98Z3P9RSDA36W?payment_method_value=5588867273870397&created_at_from=2025-10-24T00:00:00%2B07:00&created_at_to=2025-10-24T23:59:59%2B07:00" \ -H "X-PARTNER-ID: b3ed7d4b-a96c-6c08-b3c7-12c3124242d9" \ -H "Accept: application/json" \ -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." ``` -------------------------------- ### Virtual Account Response Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/virtual-account/create Examples of successful and unsuccessful API responses for virtual account requests. ```json { "status": 200, "success": true, "data": { "id": "01K6D34A9GNATKP76AQ1DGPQBG", "number": "9090777158248126", "name": "Dhany", "merchant_reff_no": "INV-2026-001", "code": "VA_BRI", "bank": { "short_name": "BRI", "number": "002", "swift_code": "BRINIDJA" }, "amount": { "value": "100000.00", "currency": "IDR" }, "amount_type": "closed", "min_amount": null, "max_amount": null, "status": "active", "kind": "permanent", "current_usage": 0 } } ``` ```json { "status": 200, "success": true, "data": { "id": "01K6D34A9GNATKP76AQ1DGPQBG", "number": "9090777158248126", "name": "Dhany Nurdiansyah", "code": "VA_BRI", "bank": { "short_name": "BRI", "number": "002", "swift_code": "BRINIDJA" }, "amount": { "value": "0.00", "currency": "IDR" }, "amount_type": "open", "min_amount": { "value": "10000.00", "currency": "IDR" }, "max_amount": { "value": "5000000.00", "currency": "IDR" }, "status": "active", "kind": "permanent", "current_usage": 0 } } ``` ```json { "status": 422, "success": false, "error": { "code": 422, "message": "Validation error", "errors": { "max_usage": [ "Max Usage is 255" ] } } } ``` -------------------------------- ### Create Payment Link Request Body Example Source: https://docs-payment-b2b.singapay.id/docs/v1/payment-link/create Example JSON payload for creating a new payment link with itemized costs and whitelisted payment methods. ```json { "reff_no": "PL20251027A002", "title": "Pembelian Tiramisu + Ongkir + Pajak", "required_customer_detail": true, "max_usage": 5, "expired_at": 1761801600000, "total_amount": 55000, "items": [ { "name": "Tiramisu Cake Slice", "quantity": 2, "unit_price": 25000 }, { "name": "Pajak (10%)", "quantity": 1, "unit_price": 5000 }, { "name": "Ongkir", "quantity": 1, "unit_price": 10000 }, { "name": "Promo Ongkir", "quantity": 1, "unit_price": -10000 } ], "whitelisted_payment_method": ["VA_BRI", "QRIS", "INDOMARET"], "redirect_url": "https://example.com/thank-you" } ``` -------------------------------- ### Trigger Top Up Request Example Source: https://docs-payment-b2b.singapay.id/docs/v1/e-wallet/trigger-top-up JSON payload for initiating an e-wallet top-up request. ```json { "account_id": "01K5G4FZZ18DMK0M5QTR8Y9QY9", "reference_number": "735463554", "ewallet_code": "DANA", "customer_number": "085733347341", "amount": { "value": "11000.00", "currency": "IDR" } } ``` -------------------------------- ### QRIS Dynamic Generation Response Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/qris/generate Examples of successful and unsuccessful API responses. ```json { "status": 200, "success": true, "data": { "id": 2, "reff_no": "6601K5WZZ71ZQ3KQJZZRV811XXHE", "status": "open", "type": "mpm-dynamic", "amount": 50000, "total_amount": 52000, "qr_data": "00020101021226570015ID.SINGAPAY.WWW01110509190001802122183098102390303UMI51440014ID.CO.QRIS.WWW02157434441747371980303UMI520472995303360540550000550202560420005802ID5923PT Tarsius Trusty Tahir6007Jakarta6105924396253051017586884180703C0108286601K5WZZ71ZQ3KQJZZRV811XXHE63042CEF", "expired_at": "2025-12-30 12:00:00", "created_at": "2025-09-24 11:33:38" } } ``` ```json { "message": "The expired at field must be a date after now.", "errors": { "expired_at": [ "The expired at field must be a date after now." ] } } ``` -------------------------------- ### Batch Notification Payload Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/product-expiration Example JSON structures for batch notifications containing either single or mixed product types. ```json // Scenario 1: Only VAs expired { "data": { "payment_links": [], // Empty "virtual_accounts": [/* 10 expired VAs */], "qris_transactions": [] // Empty }, "summary": { "total_expired": 10, "virtual_accounts_count": 10 } } // Scenario 2: Mixed expired products { "data": { "payment_links": [/* 3 expired PLs */], "virtual_accounts": [/* 5 expired VAs */], "qris_transactions": [/* 2 expired QRIS */] }, "summary": { "total_expired": 10, "payment_links_count": 3, "virtual_accounts_count": 5, "qris_transactions_count": 2 } } ``` -------------------------------- ### Balance Inquiry API Response Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/balance-inquiry/account Examples of JSON response payloads for successful and unsuccessful balance inquiry requests. ```json { "status": 200, "success": true, "data": { "held_balance": { "value": "0.00", "currency": "IDR" }, "available_balance": { "value": "7500.00", "currency": "IDR" }, "pending_balance": { "value": "0.00", "currency": "IDR" }, "balance": { "value": "7500.00", "currency": "IDR" }, "account_id": "01K8N5ZNJH8MPGAK9QM080CXW8" } } ``` ```json { "status": 401, "success": false, "error": { "code": 401, "message": "Unauthorized partner, please sign in" } } ``` -------------------------------- ### Account Creation Success Response Source: https://docs-payment-b2b.singapay.id/docs/v1/accounts/create Example of a successful JSON response returned by the API. ```json { "status": 200, "success": true, "data": { "id": "01K96K1YWFEC0BAQ9E0ZY7W882", "name": "Dhany Ahmad 19hapus", "email": "DhanyAhmad19@gmail.com", "phone": "082371268163823", "status": "active" } } ``` -------------------------------- ### Inquiry Status Response Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/card/inquiry-status JSON response structures for successful, pending, and error scenarios. ```json { "response_code": "SP000", "response_message": "Successfully", "data": { "transaction_id": "9901JAB3CD4E5F6G7H8J9K0M1N2", "reference_no": "ORD-20260225-001", "amount": 100000, "status": "success", "provider_auth_no": "123456", "card_masked": "411111******1111", "provider_result_code": "0000", "provider_result_message": "Success", "completed_at": "2026-02-25T12:15:00.000000Z", "failed_at": null } } ``` ```json { "response_code": "SP000", "response_message": "Successfully", "data": { "transaction_id": "9901JAB3CD4E5F6G7H8J9K0M1N2", "reference_no": "ORD-20260225-001", "amount": 100000, "status": "pending" } } ``` ```json { "response_code": "SP009", "response_message": "Transaction not found", "data": {} } ``` -------------------------------- ### Immediate Success Response Source: https://docs-payment-b2b.singapay.id/docs/v1/card/payment Example of a successful payment response when 3DS authentication is not required. ```json { "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" } } ``` -------------------------------- ### Build String to Sign Example Source: https://docs-payment-b2b.singapay.id/docs/v1/e-wallet/trigger-top-up Illustrates the format of the string to be signed, which combines HTTP method, endpoint, access token, hashed body, and timestamp, separated by colons. ```text stringToSign = METHOD:ENDPOINT:ACCESS_TOKEN:HASHED_BODY:TIMESTAMP ``` ```text POST:/api/v2.0/ewallet/trigger-topup:eyJ0eXAiOiJKV1QiLCJhbGc...:a1b2c3d4e5f6789...:1714618220 ``` -------------------------------- ### Request Inquiry Status Source: https://docs-payment-b2b.singapay.id/docs/v1/card/inquiry-status Examples of how to perform a GET request to the inquiry status endpoint. ```http GET /api/v2.0/card/01K5G4FZZ18DMK0M5QTR8Y9QY9/inquiry-status/9901JAB3CD4E5F6G7H8J9K0M1N2 ``` ```bash curl -X GET "https://your-domain.com/api/v2.0/card/01K5G4FZZ18DMK0M5QTR8Y9QY9/inquiry-status/9901JAB3CD4E5F6G7H8J9K0M1N2" \ -H "X-PARTNER-ID: {api_key}" \ -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc..." ``` -------------------------------- ### Get QRIS Dynamic Transactions with Reference Number and Type Filter Source: https://docs-payment-b2b.singapay.id/docs/v1/qris/list This example shows how to filter QRIS dynamic transactions using a specific reference number and transaction type. The request requires the Partner ID and Authorization token. ```HTTP GET /api/v1.0/qris-dynamic/01K8AESCCKYSD98Z3P9RSDA36W?reff_no=6601K5WZG32XJB5RSZB80XC9E2MC&type=mpm-dynamic ``` ```Shell curl -X GET "https://api.singapay.id/api/v1.0/qris-dynamic/01K8AESCCKYSD98Z3P9RSDA36W?reff_no=6601K5WZG32XJB5RSZB80XC9E2MC&type=mpm-dynamic" \ -H "X-PARTNER-ID: b3ed7d4b-a96c-6c08-b3c7-12c3124242d9" \ -H "Accept: application/json" \ -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." ``` -------------------------------- ### PHP Implementation for Access Token Source: https://docs-payment-b2b.singapay.id/docs/v1/security/get-access-tokenv11 Example implementation in PHP for generating the signature and making the API request. ```php 'client_credentials']); $ch = curl_init('https://api.example.com/api/v1.1/access-token/b2b'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $body); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response; ?> ``` -------------------------------- ### Get QRIS Dynamic Transactions with Settlement Status and Date Range Filter Source: https://docs-payment-b2b.singapay.id/docs/v1/qris/list Retrieve QRIS dynamic transactions filtered by settlement status and a creation date range. This example demonstrates how to specify boolean settlement status and date parameters. The Authorization header is required. ```HTTP GET /api/v1.0/qris-dynamic/01K8AESCCKYSD98Z3P9RSDA36W?has_settle=true&created_at_from=2025-09-24 00:00:00&created_at_to=2025-09-24 23:59:59 ``` ```Shell curl -X GET "https://api.singapay.id/api/v1.0/qris-dynamic/01K8AESCCKYSD98Z3P9RSDA36W?has_settle=true&created_at_from=2025-09-24%2000:00:00&created_at_to=2025-09-24%2023:59:59" \ -H "X-PARTNER-ID: b3ed7d4b-a96c-6c08-b3c7-12c3124242d9" \ -H "Accept: application/json" \ -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." ``` -------------------------------- ### Disbursement Transaction Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/disbursement-transaction Examples of successful and failed disbursement transactions. ```APIDOC ## Disbursement Transaction Examples ### Success Response Example ```json { "response_code": "SP000", "response_message": "Successfully", "data": { "transaction_id": "101222025122910292195055674", "reference_number": "11111111118", "transaction_status": { "code": "00", "desc": "Success" }, "post_timestamp": "1766978961000", "processed_timestamp": "1766978962000", "bank": { "code": "002", "name": "BRI", "account_name": "Dummy Test Account Internal", "account_number": "11111111118" }, "gross_amount": { "currency": "IDR", "value": "12504.00" }, "fee": { "currency": "IDR", "value": "2500" }, "net_amount": { "currency": "IDR", "value": "10004.00" }, "balance_after": { "currency": "IDR", "value": "829988" }, "notes": "test transfer" } } ``` ### Failed Response Example ```json { "response_code": "SP001", "response_message": "Transaction Failure", "data": { "transaction_id": "121222025122617513896515436", "reference_number": "333", "transaction_status": { "code": "06", "desc": "Failed" }, "post_timestamp": "1766746298000", "processed_timestamp": "", "bank": { "code": "002", "name": "BRI", "account_name": "", "account_number": "091701064838533" }, "gross_amount": { "currency": "IDR", "value": "12501.00" }, "fee": { "currency": "IDR", "value": "2500" }, "net_amount": { "currency": "IDR", "value": "10001.00" }, "balance_after": { "currency": "IDR", "value": "0" }, "notes": "test transfer", "failed_reason": "Transaction Failure : Invalid beneficiary account: Account inactive", "failed_code": "SP001" } } ``` ``` -------------------------------- ### String to Sign Construction Example Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/va-transaction Demonstrates how to construct the string that will be signed for webhook verification. It concatenates the request method, endpoint, access token, hashed body, and timestamp with colons. ```text StringToSign = METHOD:ENDPOINT:ACCESS_TOKEN:HASHED_BODY:TIMESTAMP ``` ```text Method: POST Endpoint: /webhook/va-transaction Access Token: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 Hashed Body: 5f4dcc3b5aa765d61d8327deb882cf99acd3d28e5cf0e661c02c8e8e6e8e6f9a Timestamp: 1695711945 StringToSign = POST:/webhook/va-transaction:a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6:5f4dcc3b5aa765d61d8327deb882cf99acd3d28e5cf0e661c02c8e8e6e8e6f9a:1695711945 ``` -------------------------------- ### Build String to Sign Example Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/product-expiration Illustrates how to construct the string that will be signed for webhook verification. Concatenate the HTTP method, endpoint path (including query parameters), access token, hashed request body, and timestamp, separated by colons. ```text StringToSign = METHOD:ENDPOINT:ACCESS_TOKEN:HASHED_BODY:TIMESTAMP ``` ```text Method: POST Endpoint: /webhook/product-expiration Access Token: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 Hashed Body: 5f4dcc3b5aa765d61d8327deb882cf99acd3d28e5cf0e661c02c8e8e6e8e6f9a Timestamp: 1695711945 StringToSign = POST:/webhook/product-expiration:a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6:5f4dcc3b5aa765d61d8327deb882cf99acd3d28e5cf0e661c02c8e8e6e8e6f9a:1695711945 ``` -------------------------------- ### Error Handling Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/disbursement/transfer Examples of common error responses from the B2B Payment API. ```APIDOC ## General Error ### Description This error occurs during a transaction and provides details about the failure. ### Response Example ```json { "response_code": "SP019", "response_message": "General Error", "data": { "account_id": "01K5G4FZZ18DMK0M5QTR8Y9QY9", "reference_number": "331", "amount": 61000, "notes": "test transfer", "bank_code": "BRINIDJA", "bank_account_number": "091701064838533", "message": "internal server error" } } ``` ## Expired Access Token ### Description This error is returned when the provided access token has expired. ### Response Example ```json { "status": 401, "success": false, "error": { "code": 401, "message": "Unauthorized merchant, please sign in" } } ``` ## Invalid Signature ### Description This error indicates that the request signature is invalid. ### Response Example ```json { "status": 401, "success": false, "error": { "code": 4019900, "message": "Unauthorized. Invalid X-SIGNATURE" } } ``` ``` -------------------------------- ### Create E-Wallet Order cURL Example Source: https://docs-payment-b2b.singapay.id/docs/v1/ewallet-native/create-checkout-v2 This cURL command demonstrates how to send a POST request to create an e-wallet order. Replace placeholders with your actual credentials and details. ```curl curl -X POST "https://api.singapay.id/api/v1.0/ewallet-native/create-order" \ -H "X-PARTNER-ID: b3ed7d4b-a96c-6c08-b3c7-12c3124242d9" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." \ -d '{ "account_id": "01K5G4FZZ18DMK0M5QTR8Y9QY9", "amount": 50000, "ewallet_vendor": "EWALLET_SHOPEEPAY", "customer_name": "John Doe", "customer_email": "john@example.com", "customer_phone": "081234567890", "merchant_redirect_url": "https://yoursite.com/payment/callback" }' ``` -------------------------------- ### Trigger Top Up Success Response Example Source: https://docs-payment-b2b.singapay.id/docs/v1/e-wallet/trigger-top-up JSON response structure returned upon a successful top-up request. ```json { "response_code": "SP000", "response_message": "Successful", "data": { "transaction_id": "112220251111135424691", "transaction_status": { "code": "03", "desc": "Pending" }, "reference_number": "123456789123", "ewallet": { "code": "DANA", "customer_number": "082199722404", "customer_name": "Adnan" }, "post_timestamp": "1762844064000", "processed_timestamp": "1762844065000", "balance_after": { "value": "120000.00", "currency": "IDR" }, "net_amount": { "value": "21000.00", "currency": "IDR" }, "fee": { "value": "500.00", "currency": "IDR" }, "gross_amount": { "value": "21500.00", "currency": "IDR" } } } ``` -------------------------------- ### Normalize and Hash Request Body Example Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/payment-link-inquiry Demonstrates the transformation of a JSON object into a sorted string and its subsequent SHA-256 hash. ```text Original JSON: {"status":200,"success":true,"event":"payment_link.inquiry"} After sorting: {"event":"payment_link.inquiry","status":200,"success":true} SHA-256 Hash: 5f4dcc3b5aa765d61d8327deb882cf99acd3d28e5cf0e661c02c8e8e6e8e6f9a ``` -------------------------------- ### Successful Webhook Payload Example Source: https://docs-payment-b2b.singapay.id/docs/v1/webhooks/va-transaction This is an example of a successful webhook payload received from Singa Payment Gateway for a VA transaction. ```json { "status": 200, "success": true, "event": "va-transaction", "timestamp": "26 Dec 2025 13:35:45", "data": { "transaction": { "reff_no": "INV-2026-001", "transaction_id": "3211120250926133543246", "type": "va", "status": "paid", "amount": { "value": 100000, "currency": "IDR" }, "amount_type": "closed", "tip": null, "post_timestamp": "26 Dec 2025 13:35:43", "processed_timestamp": "26 Dec 2025 13:35:45" }, "payment": { "method": "va", "additional_info": { "va_number": "7872955146576837", "va_name": "Toko Budi", "bank": { "short_name": "Maybank", "number": "016", "swift_code": "IBBKIDJA", "bank_code": "MAYBANK" }, "fees": { "name": "VA Maybank", "amount": 1500, "currency": "IDR" } } } } } ``` -------------------------------- ### List Virtual Accounts Response Example Source: https://docs-payment-b2b.singapay.id/docs/v1/accounts/list This JSON object demonstrates a successful response from the List Virtual Accounts API endpoint, including account details and pagination information. ```json { "status": 200, "success": true, "data": [ { "id": "01K946KF851RK7FX075GJHBVKF", "name": "rwa", "email": "admin@gmail.com", "phone": "081234567890", "status": "active" }, { "id": "01K7ZTFRF7TC0XB1PFHC9CM80N", "name": "pentest 1", "email": "pentest1@gmail.com", "phone": "082125202019", "status": "active" }, { "id": "01K7E5DGZCT5E225QGF4P2EE0P", "name": "Testing", "email": "julianpratam02@gmail.com", "phone": "082125202019", "status": "active" }, { "id": "01K73TA9R0FWBG6B60Q916QMHD", "name": "Julian Pratama", "email": "julian.pratama@singapay.id", "phone": "082125202019", "status": "active" }, { "id": "01K5ZT4NH8AZFFB3A52W4DN8MY", "name": "Adnan", "email": "adnan@singapay.id", "phone": "082199722404", "status": "active" } ], "pagination": { "count": 5, "total": 5, "perPage": 25, "currentPage": 1, "totalPages": 1, "links": {} } } ``` -------------------------------- ### Response Example - Success Source: https://docs-payment-b2b.singapay.id/docs/v1/e-wallet/inquiry-status A successful response includes detailed transaction data, including status, e-wallet details, and financial breakdowns. ```json { "response_code": "SP000", "response_message": "Successful", "data": { "transaction_id": "112220251111135424691", "transaction_status": { "code": "00", "desc": "Success" }, "reference_number": "123456789123", "ewallet": { "code": "DANA", "customer_number": "082199722404", "customer_name": "Adnan" }, "post_timestamp": "1762844064000", "processed_timestamp": "1762844065000", "balance_after": { "value": "120000.00", "currency": "IDR" }, "amount": { "value": "21000.00", "currency": "IDR" }, "fee_amount": { "value": "500.00", "currency": "IDR" }, "gross_amount": { "value": "21500.00", "currency": "IDR" } } } ``` -------------------------------- ### Get VA Transaction Details API Endpoint Source: https://docs-payment-b2b.singapay.id/docs/v1/va-transactions/show Use this GET endpoint to retrieve details for a specific VA transaction. Ensure you include the account ID and transaction ID in the path. ```http GET /api/v1.0/va-transactions/{account_id}/{transaction_id} ``` -------------------------------- ### Cardless Withdrawal API Response Example Source: https://docs-payment-b2b.singapay.id/docs/v1/clwd/list This is an example of a successful response from the Cardless Withdrawal API. It includes transaction details such as ID, reference number, status, amounts, QR data, and timestamps. ```json { "status": 200, "success": true, "data": [ { "id": 4, "reff_no": "6601K3GDEQVPHBBP4GRYQADG0KXT", "status": "open", "type": "mpm-dynamic", "amount": 50000, "tip_amount": 2000, "total_amount": 52000, "qr_data": "00020101021226570015ID.SINGAPAY.WWW01110508050001902122183098102390303UMI51440014ID.CO.QRIS.WWW02157434441747371980303UMI520482115303360540550000550202560420005802ID5923PT Tarsius Trusty Tahir6006Bekasi6105620546253051017561188670703C0108286601K3GDEQVPHBBP4GRYQADG0KXT63045847", "expired_at": "2025-08-30 12:00:00", "created_at": "2025-08-25 17:47:47" }, { "id": 3, "reff_no": "6601K3GCF36VVQG8J8MSNJ1MWNB1", "status": "open", "type": "mpm-dynamic", "amount": 50000, "tip_amount": 2000, "total_amount": 52000, "qr_data": "00020101021226570015ID.SINGAPAY.WWW01110508050001902122183098102390303UMI51440014ID.CO.QRIS.WWW02157434441747371980303UMI520482115303360540550000550202560420005802ID5923PT Tarsius Trusty Tahir6006Bekasi6105620546253051017561178300703C0108286601K3GCF36VVQG8J8MSNJ1MWNB16304CDED", "expired_at": "2025-08-30 12:00:00", "created_at": "2025-08-25 17:30:30" }, { "id": 2, "reff_no": "6601K3GBMHWMK2ZGNE9YGFWRAXW0", "status": "open", "type": "mpm-dynamic", "amount": 100000, "tip_amount": null, "total_amount": 100000, "qr_data": "00020101021226570015ID.SINGAPAY.WWW01110508050001902122183098102390303UMI51440014ID.CO.QRIS.WWW02157434441747371980303UMI52048211530336054061000005802ID5923PT Tarsius Trusty Tahir6006Bekasi6105620546253051017561169610703C0108286601K3GBMHWMK2ZGNE9YGFWRAXW06304E01B", "expired_at": "2025-08-25 18:15:00", "created_at": "2025-08-25 17:16:01" }, { "id": 1, "reff_no": "6601K3GBK1A9JRTFQGT79B6GS0G8", "status": "open", "type": "mpm-dynamic", "amount": 1000000, "tip_amount": null, "total_amount": 1000000, "qr_data": "00020101021226570015ID.SINGAPAY.WWW01110508050001902122183098102390303UMI51440014ID.CO.QRIS.WWW02157434441747371980303UMI520482115303360540710000005802ID5923PT Tarsius Trusty Tahir6006Bekasi6105620546253051017561169110703C0108286601K3GBK1A9JRTFQGT79B6GS0G86304EAE3", "expired_at": "2025-08-25 18:15:00", "created_at": "2025-08-25 17:15:11" } ], "pagination": { "count": 4, "total": 4, "perPage": 25, "currentPage": 1, "totalPages": 1, "links": {} } } ``` -------------------------------- ### Normalize Request Body Example Source: https://docs-payment-b2b.singapay.id/docs/v1/e-wallet/trigger-top-up Demonstrates how to sort JSON keys alphabetically for request body normalization. Ensure unicode and slashes are not escaped. ```json { "account_id": "01K5G4FZZ18DMK0M5QTR8Y9QY9", "reference_number": "735463554", "ewallet_code": "DANA", "customer_number": "085733347341", "amount": { "value": "11000.00", "currency": "IDR" } } ``` ```json {"account_id":"01K5G4FZZ18DMK0M5QTR8Y9QY9","amount":{"currency":"IDR","value":"11000.00"},"customer_number":"085733347341","ewallet_code":"DANA","reference_number":"735463554"} ``` -------------------------------- ### GET /api/v1.0/payment-link-manage/payment-methods Source: https://docs-payment-b2b.singapay.id/docs/v1/payment-link/get-available-payment-method Retrieves a list of available payment methods supported by Singapay. ```APIDOC ## GET /api/v1.0/payment-link-manage/payment-methods ### Description Retrieves a list of available payment methods that can be used for transactions. ### Method GET ### Endpoint `/api/v1.0/payment-link-manage/payment-methods` ### Headers - **X-PARTNER-ID** (Alphanumeric) - Required - API key obtained from the merchant dashboard. - **Accept** (Alphabetic) - Required - Specifies JSON as the expected response format. Example: `application/json` - **Authorization** (Alphanumeric) - Required - Bearer token obtained from the get access token endpoint. Example: `Bearer {bearerToken}` ### Response #### Success Response (200) - **status** (Numeric) - HTTP Status Code. - **success** (Boolean) - Indicates the success of the request. - **data** (Object) - The main object containing payment method data. - **payment_methods** (Array Object) - Array containing the full details of each payment method. - **code** (String) - Unique code for the payment method. - **name** (String) - Human-readable name of the payment method. - **group** (String) - Group/category of the payment method (e.g., `qris`, `va`). - **desc** (String) - A brief description of the payment method. - **available_codes** (Array String) - List of available/active payment method codes (`code`). #### Response Example ```json { "status": 200, "success": true, "data": { "payment_methods": [ { "code": "QRIS", "name": "QRIS", "group": "qris", "desc": "QR Code Indonesian Standard" }, { "code": "VA_BRI", "name": "VA BRI", "group": "va", "desc": "Virtual Account BRI" } ], "available_codes": [ "QRIS", "VA_BRI" ] } } ``` ``` -------------------------------- ### Error Response Examples Source: https://docs-payment-b2b.singapay.id/docs/v1/disbursement/transfer JSON response structures for specific API error conditions. ```json { "response_code": "SP004", "response_message": "Duplicate Reference Number", "data": { "account_id": "01K5G4FZZ18DMK0M5QTR8Y9QY9", "reference_number": "331", "amount": 61000, "notes": "test transfer", "bank_code": "BRINIDJA", "bank_account_number": "091701064838533", "message": "Transaction with this reference number already exists" } } ``` ```json { "response_code": "SP018", "response_message": "Validation error", "data": { "account_id": "01K8J8GBTB88H9Z6DVMY1XMJP8", "reference_number": "331", "amount": 61000, "notes": "test transfer", "bank_code": null, "bank_account_number": "091701064838533", "message": "Validation error 'bank_code': 'The bank code field is required.'" } } ``` ```json { "response_code": "SP003", "response_message": "Insufficient Balance", "data": { "transaction_id": "291222025122617393593025327", "reference_number": "331", "transaction_status": { "code": "06", "desc": "Failed" }, "post_timestamp": "1766745575000", "processed_timestamp": "", "bank": { "code": "002", "name": "BRI", "account_name": "", "account_number": "091701064838533" }, "gross_amount": { "currency": "IDR", "value": "63500.00" }, "fee": { "currency": "IDR", "value": "2500" }, "net_amount": { "currency": "IDR", "value": "61000.00" }, "balance_after": { "currency": "IDR", "value": "0" } } } ```