Skip to content
Developer Tools
Accelerate development using AI assistants and tools

Create Payment ​

  • Endpoint: POST /v1.0/debit/payment-host-to-host
  • Tags: Indonesia SNAP/Collection

Parameters ​

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYesContent type, value always application/json
X-TIMESTAMPheaderstringYesTransaction date time, in format yyyy-MM-dd'T'HH:mm:ss.SSSXXX
X-SIGNATUREheaderstringYesSignature need to be generated with symmetricSignature or asymmetricSignature method
ORIGINheaderstringNoOrigin domain
X-PARTNER-IDheaderstringYesUnique identifier for partner was generated by payermax, or known as clientId
X-EXTERNAL-IDheaderstringYesUnique messaging reference identifier generated by merchant and should be unique within the same day
CHANNEL-IDheaderstringYesDevice identification on which the API services is currently being accessed by the end user (customer)
AuthorizationheaderstringYesRepresents access_token of a request; string starts with keyword “Bearer ” followed by access_token

Parameter Examples ​

  • Content-Type: "application/json"
  • X-TIMESTAMP: ""
  • X-SIGNATURE: ""
  • ORIGIN: ""
  • X-PARTNER-ID: ""
  • X-EXTERNAL-ID: ""
  • CHANNEL-ID: ""
  • Authorization: ""

Request Body ​

Content-Type: application/json

FieldTypeRequiredConstraintsDescriptionEnum
merchantIdstringNomaxLength: 32Merchant identifier that is unique per each merchant
subMerchantIdstringNomaxLength: 64Sub-merchant identifier. Required for platform merchants.
partnerReferenceNostringYesmaxLength: 64Unique transaction identifier on partner system which assigned to each transaction
amountobjectYesTransaction amount
amount.valuestringYesThe order amount is passed in by the merchant. The decimal point supported by the currency of each country.
amount.currencystringYesmaxLength: 3Currency code, capital letter.
externalStoreIdstringNomaxLength: 64Store identifier to indicate to which store this payment belongs to
validUpTostringNomaxLength: 29The time when the payment will be automatically expired, in format yyyy-MM-dd'T'HH:mm:ss.SSSXXX
urlParamsarray[object]NoNotify URL that merchant must send the payment notification to
urlParams[].urlstringYesmaxLength: 512The URL
urlParams[].typestringYesmaxLength: 32URL Type:PAY_RETURN or PAY_NOTIFY
urlParams[].isDeeplinkstringYesmaxLength: 1Whther the URL is a deeplink URL or not:Y or N
payOptionDetailsarray[object]NoPayment option that will be used for this payment, this filed only supports passing one item currently
payOptionDetails[].payMethodstringNomaxLength: 64Payment Method. e.g. CREDIT_CARD
payOptionDetails[].payOptionstringNomaxLength: 64Payment option which shows the provider of this payment e.g. CREDIT_CARD_VISA
payOptionDetails[].additionalInfoobjectNo
payOptionDetails[].additionalInfo.payAccountInfoarray[object]NoPayment account info.Support collect payer’s account info on merchant side when specifying the payment method and target organization
payOptionDetails[].additionalInfo.payAccountInfo[].accountNoTypestringNomaxLength: 32account type:EMAIL,PHONE,ACCOUNT.
payOptionDetails[].additionalInfo.payAccountInfo[].accountNostringNomaxLength: 32The payment account registered by the user in the target institution under this payment method.
payOptionDetails[].additionalInfo.cardInfoobjectNoCard information
payOptionDetails[].additionalInfo.cardInfo.cardExpirationMonthstringNomaxLength: 2Card Expiration Date - month, two digits.
payOptionDetails[].additionalInfo.cardInfo.cardExpirationYearstringNomaxLength: 2Card Expiration Date - year, only the last two years are taken.
payOptionDetails[].additionalInfo.cardInfo.cardHolderFullNamestringNomaxLength: 64Cardholder’s Name.
payOptionDetails[].additionalInfo.cardInfo.cardIdentifierNostringNomaxLength: 19card ID, card number.
payOptionDetails[].additionalInfo.cardInfo.cvvstringNomaxLength: 4Card cvv, three digits for Visa and Master, four digits for AMEX.
payOptionDetails[].additionalInfo.cardInfo.dynamic3DSstringNomaxLength: 64ynamic 3ds (case insensitive) do3DS: Perform 3D Secure for this order. no3DS: Do not perform 3D Secure for this order. ext3DS: Use external 3DS results, suitable for merchants who have integrated 3DS services. The info3DSecure object is required when using this value. If no value is passed or other values are passed in, PayerMax will determine whether to initiate 3ds
payOptionDetails[].additionalInfo.paymentTokenIDstringNomaxLength: 64When paying with card token
payOptionDetails[].additionalInfo.buyerInfoobjectNobuyer information. when additionalInfo.integrate is Direct_Payment, this filed is Mandatory
payOptionDetails[].additionalInfo.buyerInfo.firstNamestringNomaxLength: 64first name of the user.
payOptionDetails[].additionalInfo.buyerInfo.middleNamestringNomaxLength: 64Middle name of the buyer.
payOptionDetails[].additionalInfo.buyerInfo.addressstringNomaxLength: 1024user’s address.
payOptionDetails[].additionalInfo.buyerInfo.citystringNomaxLength: 64user’s city.
payOptionDetails[].additionalInfo.buyerInfo.idNostringNomaxLength: 64Id NO.
payOptionDetails[].additionalInfo.buyerInfo.idTypestringNomaxLength: 32Id type.
payOptionDetails[].additionalInfo.buyerInfo.regionstringNomaxLength: 64user’s region.
payOptionDetails[].additionalInfo.buyerInfo.taxNostringNoFor tax number, please refer to 【Personal Identification】 Note:This field is required for the country of Brazil, which is the Brazilian ID number.
payOptionDetails[].additionalInfo.buyerInfo.taxTypestringNoFor tax types, please refer to 【Personal Identification】 Note:This field of Brazil country must be passed into CPF
payOptionDetails[].additionalInfo.buyerInfo.zipCodestringNomaxLength: 32post code.
payOptionDetails[].additionalInfo.buyerInfo.lastNamestringNomaxLength: 64last name of the user.
payOptionDetails[].additionalInfo.buyerInfo.phoneNostringNomaxLength: 32phone number of the user.
payOptionDetails[].additionalInfo.buyerInfo.clientIpstringNouser’s IP address. Required when additionalInfo.integrate is Direct_Payment
payOptionDetails[].additionalInfo.buyerInfo.userAgentstringNoUser browser information. Required when additionalInfo.integrate is Direct_Payment
additionalInfoobjectYesAdditional information
additionalInfo.versionstringYesmaxLength: 8API version. Current value: 1.4
additionalInfo.keyVersionstringYesmaxLength: 8Signature Algorithm Version, Current value: 1
additionalInfo.spMerchantNostringNomaxLength: 32ISV merchant identifier. Provide this field when using the ISV integration model.
additionalInfo.integratestringYesmaxLength: 16Hosted_Checkout or Direct_Payment
additionalInfo.terminalTypestringNomaxLength: 3Device terminal, the values is WEB, WAP, APP; when integrate is Direct_Payment, this value is required
additionalInfo.subjectstringYesmaxLength: 256Order title or product information, avoid using pure numbers, such as using PayerMax_Hosted_Payment_Page, it will be displayed on the user payment page Note: Brazil Pix cannot exceed 43 digits
additionalInfo.countrystringYesmaxLength: 2Country code, in uppercase letters.
additionalInfo.userIdstringYesmaxLength: 64The user ID by the merchant, needs to ensure the uniqueness of each user.After the payment method is saved, the payment method will be recommended according to the userId.
additionalInfo.referralCodestringNomaxLength: 32According to the needs of merchants, add recommended payment method dimensions, such as device ID, device fingerprint, etc., before using, please contact the docking staff.
additionalInfo.languagestringNomaxLength: 8Cashier page language
additionalInfo.referencestringNomaxLength: 512Customized data for merchant, will be returned in Callback Notification and Inquiry.
additionalInfo.goodsDetailsarray[object]NoThe goods that the user buys. A list can be submitted. Note:E-commerce industy needs to send.If the object is passed in, the inner required fields must be passed in
additionalInfo.goodsDetails[].goodsIdstringYesmaxLength: 64Product identifier. Required when a goodsDetails item is provided.
additionalInfo.goodsDetails[].goodsNamestringYesmaxLength: 128Product name. Required when a goodsDetails item is provided.
additionalInfo.goodsDetails[].quantitystringYesmaxLength: 16Number of units purchased.
additionalInfo.goodsDetails[].pricestringYesmaxLength: 20Unit price set by the merchant.
additionalInfo.goodsDetails[].goodsCurrencystringNomaxLength: 3Currency of the product price, in uppercase letters.
additionalInfo.goodsDetails[].showUrlstringNomaxLength: 128Product URL. Required for e-commerce transactions.
additionalInfo.goodsDetails[].goodsCategorystringNoProduct category. Required for e-commerce transactions.
additionalInfo.shippingInfoobjectNoshipping info. Note:E-commerce industy needs to send.If the object is passed in, the inner required fields must be passed in
additionalInfo.shippingInfo.firstNamestringYesmaxLength: 64First name of the shipping contact.
additionalInfo.shippingInfo.middleNamestringNomaxLength: 64Middle name of the shipping contact.
additionalInfo.shippingInfo.lastNamestringYesmaxLength: 64Last name of the shipping contact.
additionalInfo.shippingInfo.phoneNostringYesmaxLength: 32Phone number of the shipping contact.
additionalInfo.shippingInfo.emailstringYesmaxLength: 255Email address of the shipping contact. Required when shippingInfo is provided.
additionalInfo.shippingInfo.address1stringYesmaxLength: 1024First line of the shipping address. Required when shippingInfo is provided.
additionalInfo.shippingInfo.address2stringNomaxLength: 1024Second line of the shipping address.
additionalInfo.shippingInfo.citystringYesmaxLength: 64City of shipping address. Required when shippingInfo is provided.
additionalInfo.shippingInfo.regionstringNomaxLength: 64Region of the shipping address.
additionalInfo.shippingInfo.statestringNomaxLength: 32State or province of the shipping address. Required for Canada, the United States, the United Kingdom, and Australia.
additionalInfo.shippingInfo.countrystringYesmaxLength: 2Country of shipping address. Required when shippingInfo is provided.
additionalInfo.shippingInfo.zipCodestringYesmaxLength: 16Shipping address Zip code. Required when shippingInfo is provided.
additionalInfo.billingInfoobjectNoBilling Information.Note:If the object is passed in, the inner required fields must be passed in
additionalInfo.billingInfo.firstNamestringNomaxLength: 64First name of the billing contact.
additionalInfo.billingInfo.middleNamestringNomaxLength: 64Middle name of the billing contact.
additionalInfo.billingInfo.lastNamestringNomaxLength: 64Last name of the billing contact.
additionalInfo.billingInfo.emailstringYesmaxLength: 255Email address of the billing contact.
additionalInfo.billingInfo.phoneNostringNomaxLength: 32Phone number of the billing contact.
additionalInfo.billingInfo.address1stringYesmaxLength: 255First line of the billing address.
additionalInfo.billingInfo.address2stringNomaxLength: 1024Second line of the billing address.
additionalInfo.billingInfo.citystringYesmaxLength: 64City of billing address.
additionalInfo.billingInfo.regionstringNomaxLength: 64Region of the billing address.
additionalInfo.billingInfo.statestringNomaxLength: 32State or province of the billing address. Required for Canada, the United States, the United Kingdom, and Australia.
additionalInfo.billingInfo.countrystringYesmaxLength: 2Country of billing address.
additionalInfo.billingInfo.zipCodestringNomaxLength: 16Postal or ZIP code of the billing address.
additionalInfo.riskParamsobjectNoRisk control business data,see:【Risk Information】. This part of information is usually used as supplementary information for customized risk control. If customized risk control is not enabled, it can be left blank.
additionalInfo.envInfoobjectNoenvironmental information
additionalInfo.envInfo.deviceIdstringNoMerchant device unique identifier
additionalInfo.envInfo.deviceLanguagestringNoDevice default language
additionalInfo.envInfo.screenHeightstringNodevice height
additionalInfo.envInfo.screenWidthstringNodevice width

Example ​

json
{
  "merchantId": "{{newMerchantNo}}",
  "partnerReferenceNo": "{{$uuid}}",
  "subMerchantId": "{{subMerchantId}}",
  "amount": {
    "value": "100000.00",
    "currency": "IDR"
  },
  "externalStoreId": "STORE001",
  "validUpTo": "2026-11-16T23:59:59.000+07:00",
  "urlParams": [
    {
      "url": "https://merchant.example.com/payment/return",
      "type": "PAY_RETURN",
      "isDeeplink": "N"
    },
    {
      "url": "https://merchant.example.com/snap/notify",
      "type": "PAY_NOTIFY",
      "isDeeplink": "N"
    }
  ],
  "payOptionDetails": [
    {
      "payMethod": "CARD",
      "payOption": "VISA",
      "additionalInfo": {
        "payAccountInfo": [
          {
            "accountNoType": "EMAIL",
            "accountNo": "buyer@example.com"
          },
          {
            "accountNoType": "PHONE",
            "accountNo": "6281234567890"
          }
        ],
        "cardInfo": {
          "cardExpirationMonth": "12",
          "cardExpirationYear": "30",
          "cardHolderFullName": "John Smith",
          "cardIdentifierNo": "{{cardNumber}}",
          "cvv": "{{cvv}}",
          "dynamic3DS": "do3DS"
        },
        "paymentTokenID": "{{paymentTokenID}}",
        "buyerInfo": {
          "firstName": "John",
          "middleName": "William",
          "lastName": "Smith",
          "address": "Example Street 1",
          "city": "Jakarta",
          "idNo": "{{buyerIdNo}}",
          "idType": "{{buyerIdType}}",
          "region": "Jakarta",
          "taxNo": "{{buyerTaxNo}}",
          "taxType": "{{buyerTaxType}}",
          "zipCode": "10110",
          "phoneNo": "6281234567890",
          "clientIp": "192.0.2.10",
          "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
        }
      }
    }
  ],
  "additionalInfo": {
    "version": "1.4",
    "keyVersion": "1",
    "spMerchantNo": "{{spMerchantNo}}",
    "integrate": "Hosted_Checkout",
    "terminalType": "APP",
    "subject": "40 Diamonds",
    "country": "ID",
    "userId": "USER001",
    "referralCode": "DEVICE001",
    "language": "en",
    "reference": "merchant-reference-001",
    "goodsDetails": [
      {
        "goodsId": "GOODS001",
        "goodsName": "20 Diamonds",
        "quantity": "1",
        "price": "50000.00",
        "goodsCurrency": "IDR",
        "showUrl": "https://merchant.example.com/goods/GOODS001",
        "goodsCategory": "Digital goods"
      },
      {
        "goodsId": "GOODS002",
        "goodsName": "20 Diamonds",
        "quantity": "1",
        "price": "50000.00",
        "goodsCurrency": "IDR",
        "showUrl": "https://merchant.example.com/goods/GOODS002",
        "goodsCategory": "Digital goods"
      }
    ],
    "shippingInfo": {
      "firstName": "John",
      "middleName": "William",
      "lastName": "Smith",
      "phoneNo": "6281234567890",
      "email": "buyer@example.com",
      "address1": "Example Street 1",
      "address2": "Unit 2",
      "city": "Jakarta",
      "region": "Jakarta",
      "state": "Jakarta",
      "country": "ID",
      "zipCode": "10110"
    },
    "billingInfo": {
      "firstName": "John",
      "middleName": "William",
      "lastName": "Smith",
      "email": "buyer@example.com",
      "phoneNo": "6281234567890",
      "address1": "Example Street 1",
      "address2": "Unit 2",
      "city": "Jakarta",
      "region": "Jakarta",
      "state": "Jakarta",
      "country": "ID",
      "zipCode": "10110"
    },
    "riskParams": {
      "isGuest": "N",
      "isAgent": "N"
    },
    "envInfo": {
      "deviceId": "DEVICE001",
      "deviceLanguage": "en",
      "screenHeight": "1080",
      "screenWidth": "1920"
    }
  }
}

Responses ​

200 ​

FieldTypeRequiredConstraintsDescriptionEnum
referenceNostringYesmaxLength: 64Transaction identifier on payermax system
additionalInfoobjectYesAdditional information
additionalInfo.latestTransactionStatusstringYesmaxLength: 2Category code for the status of the transaction. The values include: 00 = Success, the order has been successfully in final state and paid 03 = Pending, the order is in process, not in final state, payment is success 05 = Cancelled, the order has been closed 06 = Failed, the order has been failed
additionalInfo.qrCodestringNomaxLength: 512QR code information returned for payment methods that support QR code payments.
additionalInfo.vaCodestringNomaxLength: 64Bank payment account information returned for applicable payment methods.
webRedirectUrlstringYesmaxLength: 1024payermax checkout URL
partnerReferenceNostringYesmaxLength: 64Unique transaction identifier on partner system which assigned to each transaction
responseMessagestringYesmaxLength: 256response msg
responseCodestringYesmaxLength: 7response code

Response Example ​

json
{
  "referenceNo": "T2024030612031450000064",
  "additionalInfo": {
    "latestTransactionStatus": "PENDING",
    "qrCode": "000201010212...6304ABCD",
    "vaCode": "8808123456789012"
  },
  "webRedirectUrl": "https://cashier-n-ind-test.payermax.id/v2/index.html#/payments?merchantId=P05010114269706&merchantAppId=3d99d87a345c4c38aa23cfd7dde01592&country=ID&tradeToken=T2024030612031450000064&language=id&token=8673428cf610486a88c6720b191dc0a5&amount=100000&currency=IDR&version=1.4&cashierId=T2024030612031450000064&frontCallbackUrl=https%3A%2F%2Fwww.payermax.com&pmaxLinkV=1",
  "partnerReferenceNo": "9755fe22-aa4a-4bae-a064-c5b850156ef5",
  "responseMessage": "Success.",
  "responseCode": "2005400"
}

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.