Example: Requesting an Alfamart Sale Using the REST API

Light Dark
Request
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
{"clientReferenceInformation": { "reconciliationId": "sale1077" }, "orderInformation": { "amountDetails": { "totalAmount": "888888888800", "currency": "IDR", "taxAmount": "5", "surcharge": { "amount": "12000" } }, "billTo": { "firstName": "John", "lastName": "abc", "country": "ID", "address1": "xyz street 13 14", "phoneNumber": "12628123456", "email": "abc@email.com" }, "shipTo": { "country": "ID", "address1": "Sudirman", "address2" :"test", "locality": "Jakarta", "postalCode": "12190" }, "lineItems": [ { "productName": "mobile", "quantity": "9", "unitPrice": "32.4", "totalAmount": "70000" }, { "productName": "table", "quantity": "9", "unitPrice": "32.4", "totalAmount": "30000" } ] }, "paymentInformation": { "paymentType": { "name": "offline", "method": { "name": "alfamart", "type":"alfaVa" } }, "customer": { "customerid": "abcd" } }, "merchantInformation": { "successUrl": "https://www.example.org/feedback.php", "merchantDescriptor": { "name": "test-merchant-descriptor" } }, "recipientInformation": { "beneficiaryAddress": "13735 SE 184th PL RN 98058", "beneficiaryId": "ben_id", "beneficiaryName": "John Doe" }, "deviceInformation": { "ipAddress": "127.0.0.1" }, "buyerInformation": { "personalIdentification": [ { "id": "personal_Identification" } ], "merchantCustomerId": "143456789700" }, "consumerAuthenticationInformation": { "customerCardAlias": "hishriva" } ] } } }}
Response to a Successful Request
12345678910
{"processorInformation": { "transactionId": "1177494712", "rawStatus": "PENDING", "paymentUrl": "https://r2.paygate.de/doku/S1150/I?tx=1177494712&rs=LNWNzQnylSg25Pd4RdEftLK5ilXDOeWg&cs=5430e64522b04fa7d8b27c2125a977efdc56f67a00ca9cdd3e5ab1e0ce5167ac" }, "reconciliationId": "sale1077", "message": "Successful", "status": "PENDING", "id": "6523329019126743604765", "submitTimeUtc": "2022-06-15T02:54:23Z"}