Credit Card
Credit Card transaction
Payment (Create Credit Card Payment)
This service is used to make Credit Card payment transactions.
Service Info
| Service Code | 54 |
| Http Method | POST |
| Path | .../v1.0/debit/payment-host-to-host |
Payload Create Payment Credit Card
| Field Name | Data Type | Mandatory | Description |
|---|---|---|---|
| partnerReferenceNo | String | Y | Transaction Number Length: 5-50Allowed Characters: letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-) |
| amount | Object | Y | Object amount |
| amount.value | String | Y | Transaction value Length: 1-12Allowed Chars: 0-9 |
| amount.currency | String | Y | Currency code Length: 3Allowed Value: IDR |
| urlParam | Array | Y | Array url |
| urlParam.url | String | Y | Url callback |
| urlParam.type | String | Y | Tipe callback Allowed Value: PAY_NOTIFY dan PAY_RETURN |
| urlParam.isDeeplink | String | Y | Flag to determine whether the callback URL is a deeplink or not Allowed Value: N |
| validUpTo | String | Y | Transaction time ends Format: YYYY-MM-DDTHH:mm:ssZ (ISO8601) Must be more than 1 minute and a maximum of 3 months from the time of request |
| additionalInfo | Object | Y | Object additionalInfo |
| additionalInfo.channel | String | Y | Channel Credit Card Allowed Value: CC |
| additionalInfo.customerPhone | String | Y | Customer phone number |
| additionalInfo.customerName | String | Y | Customer name Lenght: 5-25 Allowed characters: letters (a-z, A-Z), numbers (0-9), hyphens (-), and spaces (\s) |
{
"partnerReferenceNo":"WP-TESTING-KK-002",
"amount":{
"value":"10000",
"currency":"IDR"
},
"urlParam":[
{
"url":"https://test1.bi.go.id/v1/test",
"type":"PAY_NOTIFY",
"isDeeplink":"N"
},
{
"url":"https://test1.bi.go.id/v1/test",
"type":"PAY_RETURN",
"isDeeplink":"N"
}
],
"validUpTo":"2024-11-14T14:59:11+07:00",
"additionalInfo":{
"channel":"CC",
"customerPhone":"0895633156874",
"customerName": "Delina Prasetya"
}
}
Response Create Payment Credit Card
| Parameters | Data Type | Description |
|---|---|---|
| responseCode | String | Code response |
| responseMessage | String | Message response |
| partnerReferenceNo | String | Transaction number |
| appRedirectUrl | String | Url deeplink |
| webRedirectUrl | String | Url redirect |
| additionalInfo | Object | Object response |
| contractId | String | Generated transaction identifier in Winpay system |
| expiredTime | String | Credit Card expiration in ISO8601 format |
| channel | String | Channel Credit Card |
| instructions | Array | Array of payment instructions |
{
"responseCode": "2005400",
"responseMessage": "Success",
"partnerReferenceNo": "WP-TESTING-KK-002",
"appRedirectUrl": "",
"webRedirectUrl": "https://sandbox-cc.bmstaging.id/inv/1de9025ad363fceba004e89b46687c2f67a4cc57f2fd1a72680b4357a08e06c3",
"additionalInfo": {
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b",
"expiredTime": "2024-11-14T14:59:11+07:00",
"channel": "CC",
"instructions": []
}
}
List Response Code Create Payment Credit Card
| Response Code | Response Message | Description |
|---|---|---|
| 2005400 | Success | |
| 4005400 | Invalid response from biller | check responseMessage for the error details |
| 4005401 | Invalid field format { field name } | |
| 4005402 | Invalid mandatory field {field name} | |
| 4015400 | Invalid signature | X-Signature wrong |
| 4045416 | Partner not found | X-Partner-ID not registered |
| 4095400 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID has already been used on the same day |
| 4095401 | Duplicate partnerReferenceNo | partnerReferenceNo has been used before |
Payment Status
This service is used to check the payment status from Credit Card
Service Info
| Service Code | 55 |
| Http Method | POST |
| Path | .../v1.0/debit/status |
Payload Status Payment
| Field Name | Data Type | Mandatory | Description |
|---|---|---|---|
| originalPartnerReferenceNo | String | Y | Transaction number corresponds to the partnerReferenceNo field at the time of payment creation Length: 5-50Allowed Characters: letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-) |
| additionalInfo | Object | Y | Object additionalInfo |
| additionalInfo.contractId | String | Y | Generated transaction identifier in Winpay system |
| additionalInfo.channel | String | Y | Channel Credit Card |
{
"originalPartnerReferenceNo": "WP-TESTING-KK-002",
"additionalInfo": {
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b",
"channel":"CC"
}
}
Response Status Payment
| Parameters | Data Type | Description |
|---|---|---|
| responseCode | String | Code response |
| responseMessage | String | Message response |
| originalPartnerReferenceNo | String | Transaction number |
| serviceCode | String | Service code |
| latestTransactionStatus | String | Transaction status, Transaction success or failed based on this status Length: 2 Values: 00 => Payment Received07 => Unpaid |
| additionalInfo | Object | Object response |
| contractId | String | Generated transaction identifier in Winpay system |
{
"responseCode": "2005500",
"responseMessage": "Successful",
"originalPartnerReferenceNo": "WP-TESTING-KK-002",
"serviceCode": "54",
"latestTransactionStatus": "07",
"additionalInfo": {
"channel": "CC",
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b"
}
}
List ResponseCode Status Payment
| Response Code | Response Message | Description |
|---|---|---|
| 2005500 | Success | |
| 4005500 | Invalid response from biller | Check responseMessage for the error details |
| 4005501 | Invalid field format { field name } | |
| 4005502 | Invalid mandatory field {field name} | |
| 4015500 | Invalid signature | X-Signature wrong |
| 4045501 | Transaction not found | partnerReferenceNo and contractId not found |
| 4045516 | Partner not found | X-Partner-ID not registered |
| 4095500 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID has already been used on the same day |
| 5005502 | reqbill not found | contractIdnot found |
Payment Cancel
This service is used to cancel Credit Card payment transactions Only unpaid transactions can be cancelled.
Service Info
| Service Code | 57 |
| Http Method | POST |
| Path | .../v1.0/debit/cancel |
Payload Cancel Payment
| Field Name | Data Type | Mandatory | Description |
|---|---|---|---|
| originalPartnerReferenceNo | String | Y | Transaction number corresponds to the partnerReferenceNo field at the time of payment creation Length: 5-50Allowed Characters: letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-) |
| reason | String | Y | Cancellation reason |
| additionalInfo | Object | Y | Additional information about the object |
| contractId | String | Y | Generated transaction identifier in Winpay system |
| channel | String | Y | Channel Credit Card |
{
"originalPartnerReferenceNo": "WP-TESTING-KK-002",
"reason": "Network timeout",
"additionalInfo": {
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b",
"channel": "CC"
}
}
Response Cancel Payment
| Parameters | Data Type | Description |
|---|---|---|
| responseCode | String | Response Code |
| responseMessage | String | Message response |
| additionalInfo | Object | Object response |
| contractId | String | Generated transaction identifier in Winpay system |
{
"responseCode": "2005700",
"responseMessage": "Successful",
"additionalInfo": {
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b"
}
}
List ResponseCode Cancel Payment
| Response Code | Response Message | Description |
|---|---|---|
| 2005700 | Success | |
| 4005700 | Invalid response from biller | Check responseMessage for detail error |
| 4005701 | Invalid field format { field name } | |
| 4005702 | Invalid mandatory field {field name} | |
| 4015700 | Invalid signature | X-Signature wrong |
| 4045701 | Transaction not found | partnerReferenceNo and contractId not found |
| 4045716 | Partner not found | X-Partner-ID not registered |
| 4095700 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID has already been used on the same day |
| 5005702 | reqbill not found | contractId not found |
Handle Payment Callback
After the customer makes a payment, Winpay will send a callback to the merchant to notify the payment status The merchant must implement a service to receive callbacks from Winpay.
We will send a callback to the merchant 3x until the merchant responds with the expected response However, if the first callback attempt is successful, we will not send another callback.
Callback Info
| Service Code | 56 |
| HTTP Method | POST |
| Path | {{yoururl}}/v1.0/debit/notify |
Header structure
| Header | Value | Description |
|---|---|---|
| Content-Type | application/json | |
| X-Timestamp | 2023-08-24T17:07:05+07:00 | ISO8601 String |
| X-Partner-ID | {partnerId} | |
| X-Signature | {signature} | |
| X-External-ID | {externalId} | |
| Channel-ID | {channelId} |
Callback Payload
| Parameters | Data Type | Description |
|---|---|---|
| originalPartnerReferenceNo | String | Transaction number corresponds to the field partnerReferenceNo at the time of creation payment |
| originalReferenceNo | String | Payment reference number Winpay, unique pertransaksi |
| merchantId | String | Merchant ID |
| amount | Object | Object amount |
| amount.value | String | Transaction value Length: 1-12Allowed Chars: 0-9 |
| amount.currency | String | Currency code Length: 3Allowed Value: IDR |
| latestTransactionStatus | String | Transaction status, transaction success atau failed based on this status 00 - Success 01 - Initiated 02 - Paying 03 - Pending04 - Refunded05 - Canceled06 - Failed07 - Not found |
| additionalInfo | Object | Object additionalInfo |
| additionalInfo.channel | String | Channel Credit Card |
| additionalInfo.contractId | String | Generated transaction identifier in Winpay system |
| additionalInfo.feeAmount | String | Administrative feewinpay |
| additionalInfo.nettAmount | String | Total value received merchant |
{
"originalPartnerReferenceNo": "000000000689",
"originalReferenceNo": "53586",
"merchantId": "170041",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"latestTransactionStatus": "00",
"additionalInfo": {
"channel": "CC",
"contractId": "cc384a48e3-f6be-4755-ae85-20a3682b7cb0",
"feeAmount": "148.50",
"nettAmount": "9851.50"
}
}
Expected Response
The expected response from the merchant is as follows:
{
"responseCode": "2005600",
"responseMessage": "Successful"
}