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 | Mandatory | - | 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-PARTNER-ID | String | Variable, 36 max | Mandatory | - | ID for partner was generated by Paydia. Unique ID for a partner |
6 | 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 |
7 | CHANNEL-ID | String | Variable, 5 max | Mandatory | - | Device identification on which the API services is currently being accessed by the end user (customer) |
8 | X-SIGNATURE | String | Variable | Mandatory | - | Signature need to be generated with Symmetric Signature method |
Body
The following table is a body of request parameter:
No | Name | Type | Length | Required | Condition | Remarks |
---|---|---|---|---|---|---|
1 | partnerReferenceNo | String | Variable, 64 max | Mandatory | - | Unique transaction identifier on partner system which assigned to each transaction |
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 | Mandatory | - | Notify URL that merchant must send the payment notification to |
5 | additionalInfo | JSON Object | Variable | Mandatory | - | Additional information |
6 | serviceInfo | Object | Variable | Mandatory | - | Additional information of service |
Request Sample
The following script is a request sample of this API:
DIRECT DEBIT WITHOUT AMOUNT:
POST /snap/v1.0/debit/payment-host-to-host
Authorization-Customer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjI4MzE0MTIsImV4cCI6MTczODU5OTQxMiwianRpIjoiMGI1NjAwNWY2N2IwZWJkZWJlYmUwOGM5MWUzOWE2MzhkYTE2NTkyZmRjZjAxNWY5ZTIxMjNhM2Y3MzE1OWQ5MCIsImNsaWVudF9pZCI6ImRVVT0iLCJzY29wZSI6IlBVQkxJQ19JRCIsInN0YXRlIjoiY2Q5ZTFmZjgtNzdkMy00ZWY3LTgwMzktZDNlMzEyMGZmOGMyIn0.lUyAmugk2HULKEH5W88UyRk9t9t8RQxx7O5nYa0L-LU
X-TIMESTAMP: 2024-08-05T04:18:13+07:00
X-PARTNER-ID: 4abbcb6ce30229994c76169006e0dc9c
X-SIGNATURE: vrqN6VmrjS19XpTVrdFTbUn7U0BTuuSBoUMhja0jhfCq66yP0tx5Xz/K7+tD8vX6F0xjW6K50PZFTkEFfXDiDg==
X-EXTERNAL-ID: 1722831596
CHANNEL-ID: 12345
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjI4MzEyODcsImV4cCI6MTcyMjkxNzY4NywiZGF0YSI6eyJlbnYiOiJwcm9kdWN0aW9uIn19.wFndHWrtUMYIdbTqOtXN1EQR1y2HgafWvu-wti8IIgk
{
"partnerReferenceNo": "0faea3f5-c772-4b56-afef-2358291137d4",
"merchantId": "240327001000000",
"urlParams": [
{
"url": "https://webhook.site/16b25100-0726-4257-af54-274b2c2b6f8d",
"type": "PAY_NOTIFY",
"isDeeplink": "N"
},
{
"url": "https://paydia.id/redirect",
"type": "PAY_RETURN",
"isDeeplink": "Y"
}
],
"additionalInfo": {
"serviceInfo": {
"serviceType": "QR_PAYMENT",
"serviceScenario": "SCAN_AND_PAY"
}
}
}
DIRECT DEBIT WITH AMOUNT
POST /snap/v1.0/debit/payment-host-to-host HTTP/1.1
Host: dev-api.paydia.co.id
X-Follow-Id: d14b71af-a1bc-4c35-ae4e-220e3eea18ad
Authorization-Customer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjQ5MDA0MDEsImV4cCI6MTc0MDY2ODQwMSwianRpIjoiYjYwNDdiNTBkOTRmZWQ4YzA3ZjQzZTBjOGY0NGQ1NGMwMzUzZjE0NGM2NzI4YzhlOWYyMWNhYTBkNjFjMjBmNyIsImNsaWVudF9pZCI6ImRVVT0iLCJtZXJjaGFudF9taWQiOiJja1FFUzFVREJBSUJBZ0p3UUFSSiIsInNjb3BlIjoiUFVCTElDX0lEIiwic3RhdGUiOiI0YzVjOTZiNS04ZDJmLTQ2NzEtYTQ2Yy1kNzQ3ZDU3OTkxMjgifQ.Hmj5skRUj2TtA4fCCtREXwT9PkkdI2I83W-rDZx72n0
X-TIMESTAMP: 2024-09-09T02:30:34+07:00
X-PARTNER-ID: 35d1a1127182a65e4fe0256242a40a6d
X-SIGNATURE: rEr0trz6oU2blEVMgCwmEUYCUWZdS9Kd+/wHK7e5jnLHWRWQVNUE+fy7TtoECQD4lyYQ1MPet9DkbdqmmmImxw==
X-EXTERNAL-ID: 1725849046
CHANNEL-ID: 12345
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjU4NDU1ODMsImV4cCI6MTcyNTkzMTk4MywiZGF0YSI6eyJlbnYiOiJkZXZlbG9wbWVudCJ9fQ.UVQG0f4bhR1sRhrfDATY_UDCriFcS1I5pDiB3NfRlXg
{
"partnerReferenceNo": "44ed8b45-0ee4-4d70-b83e-729b71fc4549",
"merchantId": "240212001000000",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"urlParams": [
{
"url": "https://webhook.site/18e06ecc-1371-41ca-9ec2-42d2e89d6c91",
"type": "PAY_NOTIFY",
"isDeeplink": "N"
},
{
"url": "https://google.com",
"type": "PAY_RETURN",
"isDeeplink": "Y"
}
],
"additionalInfo": {
"serviceInfo": {
"serviceType": "PAYMENT",
"serviceScenario": "DIRECT_PAYMENT"
}
}
}
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 | Mandatory | - | Transaction identifier on Paydia |
4 | partnerReferenceNo | String | Variable, 64 max | Mandatory | - | Unique transaction identifier on partner system which assigned to each transaction |
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": "2024082aLLEnwSG1",
"partnerReferenceNo": "0faea3f5-c772-4b56-afef-2358291137d4",
"webRedirectUrl": "https://oauth-pwa-snap.paydia.co.id/validate-service?token=117a7c48ca9a0c4afbafb10fbe0b7b09752cab4f8d51b6bee802872ff76c4aa0"
}
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) | Invalid or Expired Access Token |
6 | 4035402 | Exceeds Transaction Amount Limit | Minimum or maximum amount limit |
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 |