Capture
Specification
The Following tabel is spesification for this API :
API Name | Capture |
---|---|
Function | This API is used for merchant to capture payment from user paydia |
Service Code | 65 |
Method | POST |
URL | /snap/v1.0/auth/capture |
Accept | application/json |
Content Type | application/json |
Related Service | Auth Payment |
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 | originalPartnerReferenceNo | String | Variable, 64 max | Mandatory | - | Original transaction identifier on partner system |
2 | originalReferenceNo | String | Variable, 64 max | Mandatory | - | Original transaction identifier on Paydia system. Must be filled upon successful transaction |
3 | merchantId | String | Variable, 64 max | Mandatory | - | Merchant identifier that is unique per each merchant |
4 | partnerCaptureNo | String | Variable, 64 max | Mandatory | - | Unique capture identifier on partner system which assigned to each transaction |
5 | captureAmount | Money | Variable | Mandatory | - | Contains two sub-fields:
|
6 | title | String | Variable, 256 max | Mandatory | - | Capture title |
Request Sample
The following script is a request sample of this API:
POST /snap/v1.0/auth/capture
Authorization-Customer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjQxMjI3NjIsImV4cCI6MTczOTg5MDc2MiwianRpIjoiNjY1NzAzNTRjZDQ1Mjk5YTAwYTE5NjU3OGI5MmJlZjgzNGVkNGUwZGQ1OGVjZjk0YWI1MjhiMzMxOTYyMTFhMiIsImNsaWVudF9pZCI6ImRVVT0iLCJtZXJjaGFudF9taWQiOiJja1FFU2xZR0JBSUJBZ0p3UUFSSiIsInNjb3BlIjoiUFVCTElDX0lEIiwic3RhdGUiOiI0NWMzOTc2Mi0zZDgzLTRjYTktYWRlYi00YzU1NjAwNWY2ZjIifQ.bskQVeyZD43hCXaWNaNcrSM_6A5wrSbTrJrGkpGiqno
X-TIMESTAMP: 2024-08-20T04:28:38+07:00
X-PARTNER-ID: 4abbcb6ce30229994c76169006e0dc9c
X-SIGNATURE: lf0OuhIlv9Ch9nwm8g1qhryeH/o+W9f7ytI2J7ImSaa7405YD/Tyu+gmk0HFQHazPnbvEXZjnjcizZL851Oetg==
X-EXTERNAL-ID: 1724128344
CHANNEL-ID: 12345
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjQxMjI2NzgsImV4cCI6MTcyNDIwOTA3OCwiZGF0YSI6eyJlbnYiOiJwcm9kdWN0aW9uIn19.qejS3HEFtioUn0fZ5txN2Vr1o_fHF_GWYd1H5a3ePAk
{
"originalPartnerReferenceNo": "b57d8895-790b-4da3-a9e7-0387176de9bf",
"originalReferenceNo": "c407177ce0842a3fc0f1b11d06c3a9620f48b71cf7ed255b1f2edc3de175798a",
"merchantId": "240327001000000",
"partnerCaptureNo": "85283eb7-17f4-4d26-b345-51cb31d40a67",
"captureAmount": {
"value": "7000.00",
"currency": "IDR"
},
"title": "Confirmed"
}
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 | originalPartnerReferenceNo | String | Variable, 64 max | Mandatory | - | Original transaction identifier on partner system |
4 | originalReferenceNo | String | Variable, 64 max | Mandatory | - | Original transaction identifier on Paydia system. Must be filled upon successful transaction |
5 | captureNo | String | Variable, 64 max | Mandatory | - | Capture identifier on Paydia |
6 | partnerCaptureNo | String | Variable, 64 max | Mandatory | - | Unique capture identifier on partner system which assigned to each transaction |
7 | captureAmount | Money | Variable | Mandatory | - | Amount. Contains two sub-fields:
|
8 | captureTime | String | Fixed, 25 max | Mandatory | - | Time of capture, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
9 | additionalInfo | JSON Object | Variable | Mandatory | - | Additional information |
10 | additionalInfo.feeAmount | Money | Variable | Mandatory | - | Amount. Contains two sub-fields:
|
Response Sample
The following script is a response sample of this API:
{
"responseCode": "2006500",
"responseMessage": "Request has been processed successfully",
"originalReferenceNo": "c407177ce0842a3fc0f1b11d06c3a9620f48b71cf7ed255b1f2edc3de175798a",
"originalPartnerReferenceNo": "b57d8895-790b-4da3-a9e7-0387176de9bf",
"partnerCaptureNo": "85283eb7-17f4-4d26-b345-51cb31d40a67",
"captureNo": "9329a97c-1179-4a29-a1e5-be3906b744f7",
"captureAmount": {
"value": "7000.00",
"currency": "IDR"
},
"captureTime": "2024-08-20T11:28:46-07:00",
"additionalInfo": {
"feeAmount": {
"value": "0.00",
"currency": "IDR"
}
}
}
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 | 2006500 | Request has been processed successfully | Success |
2 | 4006501 | Invalid Field Format | Invalid format for certain field |
3 | 4006502 | Invalid Mandatory Field | Missing or invalid format on mandatory field |
4 | 4016500 | Unauthorized. [reason] | General unauthorized error |
5 | 4016501 | Invalid Token (B2B) | Invalid or Expired Access Token |
6 | 4036515 | Transaction Not Permitted. | Transaction Not Permitted |
7 | 4046501 | Transaction Not Found | Transaction not found |
8 | 4046508 | Invalid Merchant | Merchant does not exist or status abnormal |
9 | 4046513 | Invalid Amount | The amount doesn't match with what supposed to |
10 | 5006501 | Internal Server Error | 500 internal server error |