Example: Requesting an Alfamart Kredivo Sale Using the REST API

Light Dark
Request
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
{"clientReferenceInformation": { "reconciliation": "sale5623", "code":"alfaKred123" }, "orderInformation": { "amountDetails": { "totalAmount": "1000000", "currency": "IDR", "taxAmount": "5", "surcharge": { "amount": "1200" } }, "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":"kredivo" } }, "customer": { "customerid": "1278" } }, "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
123456789
{"processorInformation": { "transactionId": "1175659126", "rawStatus": "PENDING", "paymentUrl": "https://r2.paygate.de/doku/S1150/I?tx=1175659126&rs=v0hSSuo0LOX0YfRgJ4lO0heL1QqHb8RQ&cs=610832f0d173f918673117622895715a2015fbbdcf173dc1937ffeb1dc6c6c57" }, "message": "Successful", "status": "PENDING", "id": "6523329019126743604781", "submitTimeUtc": "2022-06-13T04:44:26Z"}