Redirect Integration
POST/snap/v{version}/debit/payment-host-to-host
POST/snap/v{version}/debit/payment-host-to-hostUse this API in the following ways to process payments:
- To initiate a payment request
- You are using 2C2P Hosted Payment Page for payments
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request Parameters
partnerReferenceNo String Required
String RequiredUnique invoice number to identify the order on the merchant side, which is assigned by the merchant.
merchantId String Required
String RequiredUnique merchant ID that is registered with 2C2P
amount Object Required
Object RequiredShow Child Parameters
value String Required
String Required
The value of the amount as a positive integer in the smallest currency unit.
For example, if the currency is USD and the amount is $1.00, set the value of this parameter to 1.00
or if the currency is IDR and the amount is IDR 10000, set the value of this parameter to 10000
currency String Required
String RequiredTransaction currency code in 3 alphabetical values as specified in ISO 4217.
If the value is empty, the system will use the merchant's base currency
additionalInfo Object Required
Object RequiredShow Child Parameters
paymentToken Object Required
Object RequiredShow Child Parameters
description String Required
String RequiredProduct description. HTML Encode is required if it contains special characters.
Avoid using unnecessary special characters, as they may cause issues with parsing or rendering on the receiving end.
tokenize Boolean Optional
Boolean OptionalSpecify whether display store card checkbox is in payment page. Used to enable tokenization and card token will be returned when payment is approved.
request3DS Boolean Optional
Boolean OptionalSpecify enable/disable 3ds authentication
- Y – Enable 3ds (default)
- N – Disable 3ds
paymentChannel Array\[String] Optional
Array\[String] OptionalIf this value is empty, all channels can be used.
Value must be in string array if multiple payment channels are requested.
Payment Token requests for 123 Channels, please refer to Group Code column instead.
Example: \["CC", "IPP", "APM", "QR"]
Refer to Payment Channel List.
urlParams Array[urlParam] Required
Array[urlParam] RequiredResponse Parameters
responseCode String Required
String RequiredResponse code.
Possible values are listed in the response codes table on this page.
responseMessage String Required
String RequiredResponse message that explains the response code.
webRedirectUrl String
StringThe URL that redirects customers to an external page in the default browser or the embedded WebView.
appRedirectUrl String
StringThe URL scheme that redirects customers to open an app in an Android or iOS system when the target app is installed.
Updated 10 months ago
