Transaction Lookup
#
OverviewYou can retrieve transaction details using this API (for example after the Sunbit window has closed)
#
Transaction lookupThe Pre-Qualification URL API can be used to retrieve and send a pre-qualification URL to a customer.
https://api-sandbox.sunbit.com/epay/api/v1/epay#
GET#
HeadersAttribute | Required | Type | Description |
---|---|---|---|
sunbit-key | yes | text | Provided to you by Sunbit |
sunbit-secret | no | text | Provided to you by Sunbit |
#
Query ParametersAttribute | Required | Type | Description |
---|---|---|---|
purchaseId | no (if transactionId is populated) | text | The purchase Id that is generated by Sunbit for successful Sunbit flow. This ID is returned in the webhook |
transactionId | no (if purchaseId is populated) | text | Your internal id for the current transaction, should be the same as you provided during the initialization call |
#
ResponseAttribute | Type | Description |
---|---|---|
purchaseId | text | The purchase Id that is generated by Sunbit and returned in the e-Pay SDK after a successful Sunbit flow has been completed. Might be null in the case of INCOMPLETE status (when sunbit flow didn't start, for any reason) |
purchaseAmount | text | The transaction total amount. Might be null in the case of INCOMPLETE status (when sunbit flow didn't start, for any reason) |
status | text |
|
purchaseDate | date | Format: YYYY-MM-DD'T'hh:mm:ss The date and time when sunbit flow started. Might be null in the case of INCOMPLETE status (when sunbit flow didn't start, for any reason) |
Validation Call Example
#
Example#
Requestcurl 'https://api-sandbox.sunbit.com/epay/api/v1/epay?transactionId=completed-gthftredxserrr&purchaseId=39325178' \ -H 'sunbit-key: YOUR_KEY' \ -H 'sunbit-secret: YOUR_SECRET'
#
Response{ "purchaseId": "mockId", "purchaseAmount": 100, "status": "COMPLETED", "purchaseDate": "2020-06-16T01:02:42"}