Integration Guide
The steps for technical integration of Snap are explained below.
Preparation
Sign up for a Merchant Administration Portal (MAP) account, to get your API Key.
Retrieve API key that will be used for this guide.
Integration Steps Overview
Acquire redirect url
Display Snap payment page on frontend
Customer perform payment on payment page
Handling payment status update on your backend
1. Acquiring Redirect URL
API request should be done from merchant backend to acquire Snap transaction token by providing payment information and Server Key. There are at least three components that are required to obtain the Snap token which are explained in the table given below.
API Key
API server key. For more details, refer to Retrieving API Access Keys
order_no
Unique transaction order ID, defined from your side. One ID could be used only once for the order of the material. Allowed character are Alphanumeric, dash(-), underscore(_), and dot (.) String, max 50.
merchant_id
your merchant ID. Integer.
amount
transaction amount. Integer.
phone
customer phone, optional. Integer, max 15.
name
customer name, optional. String.
customer email, optional. Email.
Charge API Sample Request
base_url :
Endpoints
Production
POST
{{base_url}}/merchant/fiat/order
HTTP Headers
Accept
application/json
Content-Type
application/json
Authorization
API-KEY
API-KEY: "YourApiKey"
Sample Request to Obtain Transaction URL
curl --location -g '{{host}}/merchant/fiat/order' \
--data '{
"order_no" : "N-12346",
"merchant_id" : "12",
"amount" : "200000",
"phone" : "081208120812",
"name" : "customer name"
}'Successful Sample Response
{
"status_code": 201,
"message": "Order created successfully",
"data": {
"request": {
"order_no": "N-12346",
"merchant_id": 12,
"amount": 200000,
"phone": 81208120812,
"name": "customer name",
"email": "testing@gmail.com",
"currency": "IDR"
},
"url": "https://webview.neropay.id?key=l1e3heBxF/qkps94trvEAtBFuj3fo399i4TVdQr8GycKzs1kUEy5UEd7ld/3GWTDvl+gg494kcJ6h2VXP/pOPNFO508nyUxosETk4JT3X2Qf8RfyzVo2WKauSEr4yKbz",
"key": "l1e3heBxF/qkps94trvEAtBFuj3fo399i4TVdQr8GycKzs1kUEy5UEd7ld/3GWTDvl+gg494kcJ6h2VXP/pOPNFO508nyUxosETk4JT3X2Qf8RfyzVo2WKauSEr4yKbz"
}
}Status Codes and Errors
201
Successful creation of url.
"url": "https://webview.neropay.id?key=l1e3heBxF/qkps94trvEAtBFuj3fo399i4TVdQr8GycKzs1kUEy5UEd7ld/3GWTDvl+gg494kcJ6h2VXP/pOPNFO508nyUxosETk4JT3X2Qf8RfyzVo2WKauSEr4yKbz"
400
Failed to create a URL.
"Error Bad Request"
401
Failed to create a URL.
"Error Unathorized"
500
Failed to create a URL.
"Internal Server Error"
2. Displaying Snap Payment Page on Frontend
To display Snap payment page within your site, there is a method to choose.
Redirection Method
You can use url retrieved from backend in the previous step to redirect customer to url hosted by Neropay.
You can also use WebView to display Snap payment page within your mobile app - also useful if you're looking to implement in cross platform applications (e.g Flutter or React) or native applications (SDK method is also available and recommended for native app).

Last updated