Common steps¶
This section describes steps which are common to both, the Payment Web Application and Direct integration approach.
Callback¶
After the payment is processed, a callback is sent to given callback URL.
The callback structure is described in the callback section of POST /payins/{idPayin}
endpoint.
For more info about callbacks concepts, see the Callbacks section of this documentation.
Payment status check¶
To proactively check the incoming payment status use GET /payins/{idPayin}
endpoint.
Example CURL for requesting payment detail:
curl -X GET 'https://api.sandbox.aopay.io/payins/TST-112233' \
-H 'Accept: application/json' \
-H 'X-API-Version: 2' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcGVyYXRpb25zIjpbIlBPU1QgL3BheWlucy8hYXZhaWxhYmxlUGF5bWVudE1ldGhvZHMiLCJQT1NUIC9wYXlpbnMvVFNULTExMjIzMyIsIkdFVCAvcGF5aW5zL1RTVC0xMTIyMzMiXSwiZXhwIjoxNjIyNjIzNjY5LCJqdGkiOiI5ZThhNDUwNC04MmRmLTQyY2QtOTQ3Ni03NjE2YjEzOTJlM2IiLCJpYXQiOjE2MjI2MjMwNjksInN1YiI6IllPVVJfTUVSQ0hBTlRfQ09ERSJ9.LkYT9qXY3hEixjoiUBKqxXnazWgfLCNg37RtdG_oXw0'
{
"paymentRequested": {
"money": {
"amount": 42.05,
"currencyCode": "USD"
}
},
"process": {
"status": "SUCCESS",
"createdAt": "2021-05-19T10:57:28.313Z",
"processedAt": "2021-05-19T10:58:28.313Z",
"isTest": false
},
"fee": {
"amount": 0.1,
"currencyCode": "USD"
},
"paymentMethodResponse": {
"idPayin": "TST-112233",
"paymentMethodCode": "OFFLINE",
"account": {
"bankName": "Some real bank name",
"branchName": "Some real bank branch name"
},
"money": {
"amount": 42.05,
"currencyCode": "USD"
},
"expireAt": "2021-05-19T12:57:28.313Z",
"reference": "VA112233",
"returnUrl": "https://example.com?id=123"
}
}
Payment account check¶
To proactively check the incoming payment customer account data use GET /payins/{idPayin}/accounts
endpoint.
Example CURL for requesting payment account detail:
curl -X GET 'https://api.sandbox.aopay.io/payins/TST-112233/accounts' \
-H 'Accept: application/json' \
-H 'X-API-Version: 2' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcGVyYXRpb25zIjpbIkdFVCAvcGF5aW5zL1RTVC0xMTIyMzMvYWNjb3VudHMiXSwiZXhwIjoxNjIyNjIzNjY5LCJqdGkiOiI5ZThhNDUwNC04MmRmLTQyY2QtOTQ3Ni03NjE2YjEzOTJlM2IiLCJpYXQiOjE2MjI2MjMwNjksInN1YiI6IllPVVJfTUVSQ0hBTlRfQ09ERSJ9.Mbk75tcMqx8Jw8HGDtARK1hhUUtk_J71sU8MVD0o1CU'
{
"customerAccountRequest": {
"accountName": "Customer account name",
"accountNumber": "11223344",
"accountType": "Account type",
"bankCode": "Some real bank code",
"bankName": "Some real bank name",
"bankBranch": "Some real bank branch name",
"bankCity": "Some real bank city",
"bankProvince": "Some real bank province"
},
"customerAccountProcess": {
"accountName": "Customer account name",
"accountNumber": "11223344",
"accountType": "Account type",
"bankCode": "Some real bank code",
"bankName": "Some real bank name",
"bankBranch": "Some real bank branch name",
"bankCity": "Some real bank city",
"bankProvince": "Some real bank province"
}
}