Example: Requesting an Trustly Banks Sale Using the REST API

Request
{ "clientReferenceInformation": { "code": "sale1077" }, "orderInformation": { "amountDetails": { "totalAmount": "1400", "currency": "PLN", "taxAmount": "5" }, "billTo": { "firstName": "Jane", "lastName": "abc", "country": "PL", "address1": "xyz street 13 14", "address2": "abc street 13 14", "email": "[email protected]" }, "shipTo": { "country": "DE" } }, "paymentInformation": { "paymentType": { "name": "bankTransfer", "method": { "name": "trustly" } }, "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": "64.78.88.63", "userAgentBrowserValue": "google" }, "buyerInformation": { "personalIdentification": [ { "id": "personal_Identification" } ], "mobilePhone": "8095803465", "merchantCustomerId":"123abc" }, "consumerAuthenticationInformation": { "customerCardAlias": "hishriva" } }
Response to a Successful Request
{ "processorInformation": { "transactionId": "833406500", "rawStatus": "PENDING", "paymentUrl": "https://r3.paygate.de/ti/pprotrustly?tx=833406500&rs=Il0taHJJ66Hz7UicGb68M869vgmQ0bvo&cs=eed56688165a9567818885d956a695453ba421931a04d13e54d754d31564ed8d" }, "paymentInformation": { "binCountry": "PL" }, "message": "Successful", "status": "PENDING", "id": "652332901912674360347", "submitTimeUtc": "2022-06-07T06:08:08Z" }