Skip to main content

Direct Debit Payment

Specification

The Following tabel is spesification for this API :

API NameDirect Debit Payment
FunctionThis API is used to initiate payment from merchant’s platform to Paydia
Service Code54
MethodPOST
URL/snap/v1.0/debit/payment-host-to-host
Acceptapplication/json
Content Typeapplication/json
Related ServiceDirect Debit

Request

The following part will be describe about parameter of request in this API:

Request Parameter

The following table is a list of request parameter in this API:

The following table is Header of Request Parameters :

NoNameTypeLengthRequiredConditionRemarks
1Content-TypeStringVariable, 127 maxMandatory-Content type, value always application/json
2AuthorizationStringVariableConditionalIf the signature option is asymmetric approachContains B2B Bearer JWT Token, you've got it from Access Token B2B
3Authorization-CustomerStringVariable, 64 maxMandatory-Contains customer token, you’ve got it from Access Token B2B2C
4X-TIMESTAMPStringFixed, 25 maxMandatory-Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
5X-SIGNATUREStringVariableMandatory-Signature will be generated automatically with symmetricSignature or asymmetricSignature method
6X-PARTNER-IDStringVariable, 36 maxMandatory-ID for partner was generated by Paydia. Unique ID for a partner
7X-EXTERNAL-IDStringVariable, 36 maxMandatory-Unique messaging reference ID generated by merchant. Numeric String. Reference number that should be unique in the same day
8CHANNEL-ID StringVariable, 5 maxMandatory-Device identification on which the API services is currently being accessed by the end user (customer)

Body

The following table is a body of request parameter:

NoNameTypeLengthRequiredConditionRemarks
1partnerReferenceNoStringVariable, 64 maxMandatory-Transaction ID from merchant
2merchantIdStringVariable, 64 maxMandatory-Merchant identifier that is unique per each merchant
3amountMoneyVariableMandatory-Contains two sub-fields:
  1. Value: Transaction amount, including the cents
  2. Currency: Currency code based on ISO
4urlParamsArray of JSON ObjectVariableOptional-Notify URL that merchant must send the payment notification to
5payOptionDetailsArray of JSON ObjectVariableOptional-Payment option that will be used for this payment

Request Sample

The following script is a request sample of this API:

POST .../snap/v1.0/debit/payment-host-to-host
Authorization-Customer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE2NjczNzkzNjcsImV4cCI6MTY2NzM4Mjk2NywianRpIjoiYTdhMjkzODZiNmQ3MWNjMzc4OTkxMDFjNmE1ZWEzZmI0OTRlOWFlYjQxZWRlN2E5OWQzZjkyM2VhNDk3YTZiOCIsImNsaWVudF9pZCI6ImQwTUIiLCJzY29wZSI6IlFVRVJZX0JBTEFOQ0UsUFVCTElDX0lEIiwic3RhdGUiOiI3ZWI0NzRhZC02MzBmLTQ4MjYtYmI2Zi03MDAyZjc2NmQxNTAifQ.RVosor5mXcIZ_k79O8RKokDr4v2NQVLykwsmz61IIf4
X-TIMESTAMP: 2022-11-02T09:14:15+07:00
X-PARTNER-ID: 3068cb31c7981b5c52096c3be18edb38
X-SIGNATURE: P+z6fhC5tqq/cSexU2AMILc7o6lnxYJY2Bm9EFsmhjaCYczCSvGkNKLn4e+ORMhsI3jzmY+aYnrAe0vemY6RAc85aLdUf3PLY780OqvSpX7/eoCwJhx0iCGQs66mytfB6igmwaX0Gm4QpBddNpI+PpZWGXKiwi+IAMjto8bPkFc=' \
X-EXTERNAL-ID: 1667381313
CHANNEL-ID: 12345
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE2NjczNzc4NTEsImV4cCI6MTY2NzM4MTQ1MX0.61u_NN-QoLYU3diELlYYBg9T_PesuAnHEHzQMX3TEyI
Content-Type: application/json
{
"partnerReferenceNo": "1667379730635",
"merchantId": "220705002000000",
"amount": {
"value": "1601.00",
"currency": "IDR"
},
"urlParams": [
{
"url": "https://callback.site/",
"type": "PAY_NOTIFY",
"isDeeplink": "Y"
},
{
"url": "https://web-marchant.com",
"type": "PAY_RETURN",
"isDeeplink": "Y"
}
],
"payOptionDetails": [
{
"payMethod": "BALANCE",
"payOption": "BALANCE_PAYDIA",
"transAmount": {
"value": "1601.00",
"currency": "IDR"
}
}
]
}

Response

The following part will be describe about parameter of response in this API:

Response Parameter

The following table is a list of response parameter in this API:

Body

The following table is a body of response parameter:

NoNameTypeLengthRequiredConditionRemarks
1responseCodeStringFixed, 7 maxMandatory-Refer to response code list
2responseMessageStringVariable, 150 maxMandatory-Refer to response code list
3referenceNoStringVariable, 64 maxConditionalY := SuccessPaydia transaction identifier
4partnerReferenceNoStringVariable, 64 maxMandatory-Transaction ID from merchant
5webRedirectUrlStringVariable, 2048 maxMandatory-Paydia checkout URL

Response Sample

The following script is a response sample of this API:

{
"responseCode": "2005400",
"responseMessage": "Successful",
"referenceNo": "202211USMEALRR7p",
"partnerReferenceNo": "1667379730635",
"webRedirectUrl": "https://sb-pwa.paydia.id/bayar/543adbdf..."
}

Response Code and Message

The following table is the list response code and message of Direct Debit Payment API:

NoResponse CodeResponse MessageRemarks
12005400SuccessfulSuccess to be processed
24005401Invalid Field FormatInvalid format for certain field
34005402Invalid Mandatory FieldMissing or invalid format on mandatory field
44015400Unauthorized {reason}General unauthorized error
54015401Invalid Token (B2B)Authorization token are invalid, perhaps due to token expiry for B2B
64035402Exceeds Transaction Amount LimitAmount exceed limits
74045408Invalid MerchantMerchant does not exist or status abnormal
84095400ConflictCannot use same X-EXTERNAL-ID in same day
94095401Duplicate partnerReferenceNoDuplicate partnerReferenceNo
105005402Backend system failure500 internal server error