Attributes  
                
- METHOD TYPEE-wallet; Cash Payment; Bank Transfer
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
Local Payments Indonesia manages cash and bank transfers for payments and payouts in Indonesia.
Supported Countries
- Indonesia
Supported Currencies
- IDR
Payment (Deposit) Flow
Follow these steps to perform a payment using Nuvei REST API integration:
1. Generate a sessionToken
Press here for details.
2. Send a /payment Request
Perform the payment by sending a /payment request with its mandatory parameters including:
- userTokenId
- amount
- currency
- paymentOption.alternativePaymentMethodclass containing:- paymentMethod: “apmgw_Local_Payments_Indonesia“
- paymentasia_phone
- paymentasia_email
 
- deviceDetailsclass containing:- ipAddress
- billingAddressclass containing:- firstName,- lastName,- email,- phone,- country
- userDetailsclass containing:- firstName,- lastName,- email,- phone,- country
Example /payment Request
{
  "sessionToken":"<sessionToken from /getSessionToken>",
  "merchantId":"<your merchantId>",
  "merchantSiteId":"<your merchantSiteId>",
  "clientRequestId":"<unique request ID in merchant system>",
  "amount":"200",
  "currency":"IDR",
  "userTokenId":"<unique customer identifier in merchant system>",
  "clientUniqueId":"<unique transaction ID in merchant system>",
  "paymentOption":{
    "alternativePaymentMethod":{
      "paymentMethod":"apmgw_Local_Payments_Indonesia",
      "paymentasia_phone":"<paymentasia_phone>",
      "paymentasia_email":"<paymentasia_email>"
    }
  },
  "deviceDetails":{
    "ipAddress":"<customer's IP address>"
  },
  "billingAddress": {
    "firstName": "John",
    "lastName": "Smith",
    "country": "ID",
    "email": "[email protected]",
    "phone": "628607489957"
  },
  "userDetails":{
    "firstName": "John",
    "lastName": "Smith",
    "country": "ID",
    "email": "[email protected]",
    "phone": "628607489957"
  },
  "timeStamp":"<YYYYMMDDHHmmss>",
  "checksum":"<calculated checksum>"
}
The response generates and returns a redirect URL (redirectUrl) to redirect the customer to the payment page.
Example /payment Response
{
  "internalRequestId": 27116701,
  "status": "SUCCESS",
  "errCode": 0,
  "reason": "",
  "merchantId": "4972436454212160565",
  "merchantSiteId": "3111",
  "version": "1.0",
  "clientRequestId": "20230607155122",
  "sessionToken": "bff6d623-0afb-4895-ba60-ca06bd248f97",
  "orderId": "39347131",
  "paymentOption": {
    "redirectUrl": "https://apmtest.gate2shop.com/ppp/resources/cdn/v1/get_to_post/index.html?eyJhbGciOiJSUzI1NiJ9.eyJhbW91bnQiOiIxMTAwMC4wMCIsImN1cnJlbmN5IjoiSURSIiwiY3VzdG9tZXJfYWRkcmVzcyI6IjM0MDY4OSBtYWluIFN0LiIsImN1c3RvbWVyX2NvdW50cnkiOiJJRCIsImN1c3RvbWVyX2VtYWlsIjoibXlAbWFpbC5jb20iLCJjdXN0b21lcl9maXJzdF9uYW1lIjoiSm9obiIsImN1c3RvbWVyX2lwIjoiOTMuMTQ2LjI1NC4xNzIiLCJjdXN0b21lcl9sYXN0X25hbWUiOiJTbWl0aCIsImN1c3RvbWVyX3Bob25lIjoiNjIxMTExMTExMTEiLCJtZXJjaGFudF9yZWZlcmVuY2UiOiJEMTdBN0EyREE3QTAzRDIzRTk0M0NBNUVBMjQwNjc2NyIsIm5ldHdvcmsiOiJEaXJlY3REZWJpdCIsInJldHVybl91cmwiOiJodHRwczovL2p1bXBib3guc2FmZWNoYXJnZS5jb20vZG16L0FwbUNvbm5lY3Rvci9EMTdBN0EyREE3QTAzRDIzRTk0M0NBNUVBMjQwNjc2NyIsInNpZ24iOiJmNThmYjUwYjA1OGY2Mzg0NWE3ODBjNTZjYTNiNzk3ZDhhMWE4YjBmMzcwOWEzM2JmODljODRmYjRmZWFjYTdhMWJlMzExYjVmNzM0NzU3YjEzMDFiN2VkODg1NTEwNzNjZjI3ZmE0ZjA3OGE3ZTc0M2NjODNmMDk1NDg3NzVhMSIsInVybCI6Imh0dHBzOi8vcGF5bWVudC5wYS1zeXMuY29tL2FwcC9wYWdlL2E2Yjg3NWE0LWE3MTMtNDNjYS1hMjNkLWE5ODNiNGMwMjgzNiJ9.IJ2YJsQpyvfYyUlbyWqHE0XcKAoNCMy5fHTATIqL5wjeGIvOpmaVIoaS0d6jUwU03B1LDtfudvkCJj8N_Rdek9w6GV35VB1W59Cn6Z2kydZW9KIu7zLk61YkH-ySwsllJs1f_vcn-GqlatkIAia4T7hY4UdWdU9d5hoKygA9S_Fq6QXhH9WbO_pPippcqZZdKhZuB5LWtRL-Noc6mWrQ0Idsh6ZL62U5JAs8sAmNKG2beczpXfMuIw0l3z_FzeleJVKJCNDoEof3IyL1ZFaTxE-qWWqq6BB6PicoSyXwsD4Vaq2thSGa-NI99ZzKmo1Nq7qDoyqxdh4Jn8i9Aiujyg",
    "userPaymentOptionId": "",
    "card": {}
  },
  "transactionStatus": "REDIRECT"
}
Payout (Withdrawal) Flow
When performing a /payout with Local Payments Indonesia, the following flow including the /accountCapture method is used before processing the /payout request:
- Generate a sessionToken. Press here for details.
- Send an /accountCapturerequest that includes the following mandatory fields as shown in the example request below:- userTokenId– Unique customer identifier in merchant system.
- paymentMethod: “apmgw_Local_Payments_Indonesia“
- currencyCode: IDR
- countryCode: ID
 - Example- /accountCaptureRequest- { "sessionToken": "9610a8f6-44cf-4c4f-976a-005da69a2a3b", "merchantId": "427583496191624621", "merchantSiteId": "142033", "paymentMethod": "apmgw_Local_Payments_Indonesia", "userTokenId": "230811147", "currencyCode": "IDR", "countryCode": "ID", "amount": "200", "languageCode": "en", "notificationUrl": "<notificationURL>" }- The request returns a - redirectUrl.- Example- /accountCaptureResponse- { "internalRequestId": 27117051, "status": "SUCCESS", "errCode": 0, "reason": "", "merchantId": "4972436454212160565", "merchantSiteId": "3111", "version": "1.0", "clientRequestId": "20230607160110", "sessionToken": "c25bdd93-e2d0-4f27-b4c0-9cb6d0c54941", "redirectUrl": "https://apmtest.gate2shop.com/ppp/resources/cdn/v1/bank-capture-345212.html?submitUrl=https%3A%2F%2Fjumpbox.safecharge.com%2Fdmz%2FApmConnector%2FbankCapture%2F54FAEED1874A5359F1BAC3E7FD682AB2&beneficiaryEmail=john.smith%40email.com&beneficiaryPhone=6175551414&beneficiaryLastName=Smith&beneficiaryFirstName=John&locale=en_ID&pm=DokuPay", "userTokenId": "Test" }
 
- Use redirectUrlto redirect the customer to the APM’s account details capture interface for them to enter their account details.
- Once the information is captured, Nuvei stores the data in a userPaymentOptionId(UPO) identifier, and sends a Direct Merchant Notification (DMN) back to you with the newly createduserPaymentOptionId.
- Send a /payoutrequest and include theuserPaymentOptionId, which contains the user’s previously stored APM account details. Press here for an example.
 After the transaction is processed, Nuvei sends a DMN that includes the result of the transaction to the URL provided inurlDetails.notificationUrl, which Nuvei recommends including in the/paymentrequest
User Experience
The user is redirected to third-party website where they can select their preferred payment options.


