Skip to main content

Refund - Auth Payment

Specification

The Following tabel is spesification for this API :

API NameRefund - Auth Payment
FunctionThis API is used to request refund payment user paydia base on auth payment
Service Code69
MethodPOST
URL/snap/v1.0/auth/refund
Acceptapplication/json
Content Typeapplication/json
Related ServiceAuth 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:

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
1originalPartnerReferenceNoStringVariable, 64 maxMandatory-Original transaction identifier on partner system
2originalReferenceNoStringVariable, 64 maxOptional-Original transaction identifier on Paydia system. Must be filled upon successful transaction
3partnerRefundNoStringVariable, 64 maxMandatory-Unique refund identifier on partner system which assigned to each transaction
4originalCaptureNoStringVariable, 64 maxOptional-Original capture identifier on Paydia system. Must be filled upon successful transaction
5merchantIdStringVariable, 64 maxMandatory-Merchant identifier that is unique per each merchant
6refundAmountMoneyVariableMandatory-Contains two sub-fields:
  1. Value: Transaction amount, including the cents
  2. Currency: Currency code based on ISO
7reasonStringVariable, 256 maxMandatory-Refund reason

Request Sample

The following script is a request sample of this API:

POST /snap/v1.0/auth/refund
Authorization-Customer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjQxMjI3NjIsImV4cCI6MTczOTg5MDc2MiwianRpIjoiNjY1NzAzNTRjZDQ1Mjk5YTAwYTE5NjU3OGI5MmJlZjgzNGVkNGUwZGQ1OGVjZjk0YWI1MjhiMzMxOTYyMTFhMiIsImNsaWVudF9pZCI6ImRVVT0iLCJtZXJjaGFudF9taWQiOiJja1FFU2xZR0JBSUJBZ0p3UUFSSiIsInNjb3BlIjoiUFVCTElDX0lEIiwic3RhdGUiOiI0NWMzOTc2Mi0zZDgzLTRjYTktYWRlYi00YzU1NjAwNWY2ZjIifQ.bskQVeyZD43hCXaWNaNcrSM_6A5wrSbTrJrGkpGiqno
X-TIMESTAMP: 2024-08-20T07:31:05+07:00
X-PARTNER-ID: 4abbcb6ce30229994c76169006e0dc9c
X-SIGNATURE: vr89lwkQbAc3jt0P+kn2mFLX7997HiVrwKzyW/oZpAQBnz3M9GznGqpn+Z6mMup/Y2BsMZ64mUePtqxwanAVnw==
X-EXTERNAL-ID: 1724139162
CHANNEL-ID: 12345
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjQxMjI2NzgsImV4cCI6MTcyNDIwOTA3OCwiZGF0YSI6eyJlbnYiOiJwcm9kdWN0aW9uIn19.qejS3HEFtioUn0fZ5txN2Vr1o_fHF_GWYd1H5a3ePAk

{
"originalPartnerReferenceNo": "b57d8895-790b-4da3-a9e7-0387176de9bf",
"originalReferenceNo": "c407177ce0842a3fc0f1b11d06c3a9620f48b71cf7ed255b1f2edc3de175798a",
"partnerRefundNo": "769ad65f-f7d9-40a5-b56c-64695712f8ac",
"merchantId": "240327001000000",
"originalCaptureNo": "9329a97c-1179-4a29-a1e5-be3906b744f7",
"refundAmount": {
"value": "7000.00",
"currency": "IDR"
},
"reason": "Customer complain"
}

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
3originalReferenceNoStringVariable, 64 maxMandatory-Original transaction identifier on Paydia system. Must be filled upon successful transaction
4originalCaptureNoStringVariable, 64 maxOptional-Original capture identifier on Paydia system. Must be filled upon successful transaction
5originalPartnerReferenceNoStringVariable, 64 maxMandatory-Original transaction identifier on partner system
6refundNoStringVariable, 64 maxMandatory-Refund identifier on Paydia
7partnerRefundNoStringVariable, 64 maxMandatory-Unique refund identifier on partner system which assigned to each transaction
8refundAmountMoneyVariableMandatory-Amount. Contains two sub-fields:
  1. Value: Transaction amount, including the cents
  2. Currency: Currency code based on ISO
9refundTimeStringFixed, 25 maxMandatory-Time of refund, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)

Response Sample

The following script is a response sample of this API:

{
"responseCode": "2006900",
"responseMessage": "Request has been processed successfully",
"originalReferenceNo": "c407177ce0842a3fc0f1b11d06c3a9620f48b71cf7ed255b1f2edc3de175798a",
"originalCaptureNo": "9329a97c-1179-4a29-a1e5-be3906b744f7",
"originalPartnerReferenceNo": "b57d8895-790b-4da3-a9e7-0387176de9bf",
"partnerRefundNo": "769ad65f-f7d9-40a5-b56c-64695712f8ac",
"refundNo": "1fc13d90935a42b5a0f9d4041a1b281bfc6420f1229eb7463cd0e2be38e29bfa",
"refundAmount": {
"value": "7000.00",
"currency": "IDR"
},
"refundTime": "2024-08-20T14:31:13-07:00"
}

Response Code and Message

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

NoResponse CodeResponse MessageRemarks
12006900Request has been processed successfullySuccess
24006901Invalid Field FormatInvalid format for certain field
34006902Invalid Mandatory FieldMissing or invalid format on mandatory field
44016900Unauthorized [reason]General unauthorized error
54016901Invalid Token (B2B)Authorization token are invalid, perhaps due to token expiry for B2B
64036914Insufficient FundsInsufficient fund to do refund
74036915Transaction Not Permitted.Transaction Not Permitted
84036923Account Limit ExceedAccount aggregated purchase amount on that day exceeds the agreed limit
94046900Invalid Transaction StatusInvalid transaction status
104046901Transaction Not FoundTransaction not found
114046908Invalid MerchantMerchant does not exist or status abnormal
124046913Invalid AmountInvalid amount to do refund
134056901Requested Opearation Is Not AllowedRequested operation to cancel/refund transaction Is not allowed at this time.
145006901Internal Server Error500 internal server error