What is SNAP?
SNAP is an Indonesia abbreviation, which stands for Standar NasionalOpen API Pembayaran, which means the National Standard for Payments Open API, compiled and defined by Bank Indonesia (BI) or Central Bank of Indonesia.
Official website for SNAP can be found here https://apidevportal.aspi-indonesia.or.id/
SNAP defines standards for Payments API in Indonesia. In summary, SNAP defines the following:
- Security standard, i.e. asymmetric signature
- Standardized API URL
- Standardized mandatory and optional headers
- Standardized request and response payload structure
- Data format uses JSON with camelCase
SNAP API is used mainly for money-in transaction. You can use our Payouts API for money-out transaction.
How to Activate SNAP APIs
To get started, you will need:
- Create a Xendit account
- Email us at help@xendit.co with the following:
- Please provide your Business ID that can be obtained on your dashboard.
- Indicate that you would you like to activate these 3 items on your dashboard:
- SNAP Application Registration;
- Digital Signature Key Management;
- SNAP Webhook URL setup.
- Activation process will take approximately 1 x 24 hours.
Once you have received your Client ID and RSA keys have been exchanged, you can start to make API calls to Xendit SNAP APIs.
Difference Between Xendit vs SNAP APIs
As an existing Xendit customer who is using Xendit APIs, you might want to see the difference between your current Xendit integration and SNAP APIs to understand the difference and the work needed to adopt SNAP APIs.
In this section, we will use Virtual Account product as an example to visualize the difference between Xendit Regional VA API and Xendit SNAP VA API. Please refer to the following table for comparison:
COMPONENT | XENDIT REGIONAL API | SNAP API |
---|---|---|
URL | https://api.xendit.co/callback_virtual_accounts | https://api.xendit.co/snap/v1.0/transfer-va/create-va |
Security - Authentication |
Using Basic Auth + API Key through Authorization header |
Using Client ID in header through X-PARTNER-ID header |
Security - Signature | Optional, with the ability to make signature mandatory | Mandatory |
Mandatory Headers |
Content-Type , Authorization
|
Content-Type , X-PARTNER-ID , X-EXTERNAL-ID , etc (refer to Headers section above) |
Data Format | Use snake_case, i.e. account_number |
Use camelCase, i.e. accountNumber
|
Request | Using VA API as example - external_id - name - etc |
Using VA API as example - trxId - virtualAccountName - etc |
Response |
For successful response, returns body response. For error response, returns error_code and message
|
Returns responseCode , responseMessage . For successful response, returns additional body response |
API References
You can visit our complete API reference here: https://xendit.stoplight.io/docs/snap-api/a3055895b60d5-xendit-snap-ap-is-beta