Skip to main content

Credit Card

Credit Card transaction

Payment (Create Credit Card Payment)

This service is used to make Credit Card payment transactions.

Service Info

Service Code54
Http MethodPOST
Path.../v1.0/debit/payment-host-to-host

Payload Create Payment Credit Card

Field NameData TypeMandatoryDescription
partnerReferenceNoStringYTransaction Number
Length: 5-50
Allowed Characters: letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-)
amountObjectYObject amount
amount.valueStringYTransaction value
Length: 1-12
Allowed Chars: 0-9
amount.currencyStringYCurrency code
Length: 3
Allowed Value: IDR
urlParamArrayYArray url
urlParam.urlStringYUrl callback
urlParam.typeStringYTipe callback
Allowed Value: PAY_NOTIFY dan PAY_RETURN
urlParam.isDeeplinkStringYFlag to determine whether the callback URL is a deeplink or not
Allowed Value: N
validUpToStringYTransaction 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
additionalInfoObjectYObject additionalInfo
additionalInfo.channelStringYChannel Credit Card
Allowed Value: CC
additionalInfo.customerPhoneStringYCustomer phone number
additionalInfo.customerNameStringYCustomer 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

ParametersData TypeDescription
responseCodeStringCode response
responseMessageStringMessage response
partnerReferenceNoStringTransaction number
appRedirectUrlStringUrl deeplink
webRedirectUrlStringUrl redirect
additionalInfoObjectObject response
contractIdStringGenerated transaction identifier in Winpay system
expiredTimeStringCredit Card expiration in ISO8601 format
channelStringChannel Credit Card
instructionsArrayArray 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 CodeResponse MessageDescription
2005400Success
4005400Invalid response from billercheck responseMessage for the error details
4005401Invalid field format { field name }
4005402Invalid mandatory field {field name}
4015400Invalid signatureX-Signature wrong
4045416Partner not foundX-Partner-ID not registered
4095400Cannot use same X-EXTERNAL-ID in same dayX-External-ID has already been used on the same day
4095401Duplicate partnerReferenceNopartnerReferenceNo has been used before

Payment Status

This service is used to check the payment status from Credit Card

Service Info

Service Code55
Http MethodPOST
Path.../v1.0/debit/status

Payload Status Payment

Field NameData TypeMandatoryDescription
originalPartnerReferenceNoStringYTransaction number corresponds to the partnerReferenceNo field at the time of payment creation
Length: 5-50
Allowed Characters: letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-)
additionalInfoObjectYObject additionalInfo
additionalInfo.contractIdStringYGenerated transaction identifier in Winpay system
additionalInfo.channelStringYChannel Credit Card
{
"originalPartnerReferenceNo": "WP-TESTING-KK-002",
"additionalInfo": {
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b",
"channel":"CC"
}
}

Response Status Payment

ParametersData TypeDescription
responseCodeStringCode response
responseMessageStringMessage response
originalPartnerReferenceNoStringTransaction number
serviceCodeStringService code
latestTransactionStatusStringTransaction status, Transaction success or failed based on this status
Length: 2
Values:
00 => Payment Received
07 => Unpaid
additionalInfoObjectObject response
contractIdStringGenerated 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 CodeResponse MessageDescription
2005500Success
4005500Invalid response from billerCheck responseMessage for the error details
4005501Invalid field format { field name }
4005502Invalid mandatory field {field name}
4015500Invalid signatureX-Signature wrong
4045501Transaction not foundpartnerReferenceNo and contractId not found
4045516Partner not foundX-Partner-ID not registered
4095500Cannot use same X-EXTERNAL-ID in same dayX-External-ID has already been used on the same day
5005502reqbill not foundcontractIdnot found

Payment Cancel

This service is used to cancel Credit Card payment transactions Only unpaid transactions can be cancelled.

Service Info

Service Code57
Http MethodPOST
Path.../v1.0/debit/cancel

Payload Cancel Payment

Field NameData TypeMandatoryDescription
originalPartnerReferenceNoStringYTransaction number corresponds to the partnerReferenceNo field at the time of payment creation
Length: 5-50
Allowed Characters: letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-)
reasonStringYCancellation reason
additionalInfoObjectYAdditional information about the object
contractIdStringYGenerated transaction identifier in Winpay system
channelStringYChannel Credit Card
{
"originalPartnerReferenceNo": "WP-TESTING-KK-002",
"reason": "Network timeout",
"additionalInfo": {
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b",
"channel": "CC"
}
}

Response Cancel Payment

ParametersData TypeDescription
responseCodeStringResponse Code
responseMessageStringMessage response
additionalInfoObjectObject response
contractIdStringGenerated transaction identifier in Winpay system
{
"responseCode": "2005700",
"responseMessage": "Successful",
"additionalInfo": {
"contractId": "cc78f3c08e-b051-4db7-bd94-a958a7d69c5b"
}
}

List ResponseCode Cancel Payment

Response CodeResponse MessageDescription
2005700Success
4005700Invalid response from billerCheck responseMessage for detail error
4005701Invalid field format { field name }
4005702Invalid mandatory field {field name}
4015700Invalid signatureX-Signature wrong
4045701Transaction not foundpartnerReferenceNo and contractId not found
4045716Partner not foundX-Partner-ID not registered
4095700Cannot use same X-EXTERNAL-ID in same dayX-External-ID has already been used on the same day
5005702reqbill not foundcontractId 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 Code56
HTTP MethodPOST
Path{{yoururl}}/v1.0/debit/notify

Header structure

HeaderValueDescription
Content-Typeapplication/json
X-Timestamp2023-08-24T17:07:05+07:00ISO8601 String
X-Partner-ID{partnerId}
X-Signature{signature}
X-External-ID{externalId}
Channel-ID{channelId}

Callback Payload

ParametersData TypeDescription
originalPartnerReferenceNoStringTransaction number corresponds to the field partnerReferenceNo at the time of creation payment
originalReferenceNoStringPayment reference number Winpay, unique pertransaksi
merchantIdStringMerchant ID
amountObjectObject amount
amount.valueStringTransaction value
Length: 1-12
Allowed Chars: 0-9
amount.currencyStringCurrency code
Length: 3
Allowed Value: IDR
latestTransactionStatusStringTransaction status, transaction success atau failed based on this status
00 - Success
01 - Initiated
02 - Paying
03 - Pending
04 - Refunded
05 - Canceled
06 - Failed
07 - Not found
additionalInfoObjectObject additionalInfo
additionalInfo.channelStringChannel Credit Card
additionalInfo.contractIdStringGenerated transaction identifier in Winpay system
additionalInfo.feeAmountStringAdministrative feewinpay
additionalInfo.nettAmountStringTotal 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"
}