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
2AuthorizationStringVariableMandatory-Contains 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-PARTNER-IDStringVariable, 36 maxMandatory-ID for partner was generated by Paydia. Unique ID for a partner
6X-EXTERNAL-IDStringVariable, 36 maxMandatory-Unique messaging reference ID generated by merchant. Numeric String. Reference number that should be unique in the same day
7CHANNEL-IDStringVariable, 5 maxMandatory-Device identification on which the API services is currently being accessed by the end user (customer)
8X-SIGNATUREStringVariableMandatory-Signature need to be generated with Symmetric Signature method

Body

The following table is a body of request parameter:

NoNameTypeLengthRequiredConditionRemarks
1partnerReferenceNoStringVariable, 64 maxMandatory-Unique transaction identifier on partner system which assigned to each transaction
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 ObjectVariableMandatory-Notify URL that merchant must send the payment notification to
5additionalInfoJSON ObjectVariableMandatory-Additional information
6serviceInfoObjectVariableMandatory-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:

NoNameTypeLengthRequiredConditionRemarks
1responseCodeStringFixed, 7 maxMandatory-Refer to response code list
2responseMessageStringVariable, 150 maxMandatory-Refer to response code list
3referenceNoStringVariable, 64 maxMandatory-Transaction identifier on Paydia
4partnerReferenceNoStringVariable, 64 maxMandatory-Unique transaction identifier on partner system which assigned to each transaction
5webRedirectUrlStringVariable, 2048 maxMandatory-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:

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)Invalid or Expired Access Token
64035402Exceeds Transaction Amount LimitMinimum or maximum amount limit
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