Direct Debit Payment
Specification
The Following tabel is spesification for this API :
API Name | Direct Debit Payment |
---|---|
Function | This API is used to initiate payment from merchant’s platform to Paydia |
Service Code | 54 |
Method | POST |
URL | /snap/v1.0/debit/payment-host-to-host |
Accept | application/json |
Content Type | application/json |
Related Service | Direct 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:
Header
The following table is Header of Request Parameters :
No | Name | Type | Length | Required | Condition | Remarks |
---|---|---|---|---|---|---|
1 | Content-Type | String | Variable, 127 max | Mandatory | - | Content type, value always application/json |
2 | Authorization | String | Variable | Conditional | If the signature option is asymmetric approach | Contains B2B Bearer JWT Token, you've got it from Access Token B2B |
3 | Authorization-Customer | String | Variable, 64 max | Mandatory | - | Contains customer token, you’ve got it from Access Token B2B2C |
4 | X-TIMESTAMP | String | Fixed, 25 max | Mandatory | - | Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
5 | X-SIGNATURE | String | Variable | Mandatory | - | Signature will be generated automatically with symmetricSignature or asymmetricSignature method |
6 | X-PARTNER-ID | String | Variable, 36 max | Mandatory | - | ID for partner was generated by Paydia. Unique ID for a partner |
7 | X-EXTERNAL-ID | String | Variable, 36 max | Mandatory | - | Unique messaging reference ID generated by merchant. Numeric String. Reference number that should be unique in the same day |
8 | CHANNEL-ID | String | Variable, 5 max | Mandatory | - | 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:
No | Name | Type | Length | Required | Condition | Remarks |
---|---|---|---|---|---|---|
1 | partnerReferenceNo | String | Variable, 64 max | Mandatory | - | Transaction ID from merchant |
2 | merchantId | String | Variable, 64 max | Mandatory | - | Merchant identifier that is unique per each merchant |
3 | amount | Money | Variable | Mandatory | - | Contains two sub-fields:
|
4 | urlParams | Array of JSON Object | Variable | Optional | - | Notify URL that merchant must send the payment notification to |
5 | payOptionDetails | Array of JSON Object | Variable | Optional | - | 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:
No | Name | Type | Length | Required | Condition | Remarks |
---|---|---|---|---|---|---|
1 | responseCode | String | Fixed, 7 max | Mandatory | - | Refer to response code list |
2 | responseMessage | String | Variable, 150 max | Mandatory | - | Refer to response code list |
3 | referenceNo | String | Variable, 64 max | Conditional | Y := Success | Paydia transaction identifier |
4 | partnerReferenceNo | String | Variable, 64 max | Mandatory | - | Transaction ID from merchant |
5 | webRedirectUrl | String | Variable, 2048 max | Mandatory | - | 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:
No | Response Code | Response Message | Remarks |
---|---|---|---|
1 | 2005400 | Successful | Success to be processed |
2 | 4005401 | Invalid Field Format | Invalid format for certain field |
3 | 4005402 | Invalid Mandatory Field | Missing or invalid format on mandatory field |
4 | 4015400 | Unauthorized {reason} | General unauthorized error |
5 | 4015401 | Invalid Token (B2B) | Authorization token are invalid, perhaps due to token expiry for B2B |
6 | 4035402 | Exceeds Transaction Amount Limit | Amount exceed limits |
7 | 4045408 | Invalid Merchant | Merchant does not exist or status abnormal |
8 | 4095400 | Conflict | Cannot use same X-EXTERNAL-ID in same day |
9 | 4095401 | Duplicate partnerReferenceNo | Duplicate partnerReferenceNo |
10 | 5005402 | Backend system failure | 500 internal server error |