Before hit this API, Paycloud will call Access Token API B2B Merchant first.
Access Token B2B
| URL and Path | |
|---|---|
| Path | [merchant_endpoint]/api/v1.0/access-token/b2b |
| HTTP Method | POST |
| Version | v1.0 |
| Service Code | 73 |
Request Header
| Field Name | Field Type | Field Description |
|---|---|---|
| Content-Type | String (Required) | Type of the content. |
| X-TIMESTAMP | String (Required) | Client’s current local time in ISO-8601 format. Transaction date time, in format YYYYMMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time). |
| X-SIGNATURE | String (Required) | Created using asymmetric signature SHA256withRSA algorithm. Read here |
| X-CLIENT-KEY | String (Required) | Client’s client_id (given at the completion registration process) |
Content-type : application/json
X-TIMESTAMP : 2024-07-06T14:12:50+07:00
X-SIGNATURE : neGbHoFVY1d7EtG8Z6VBWwykvyqIkg
X-CLIENT-KEY : PaycloudSnap
Request Body
| Field Name | Field Type | Field Description |
|---|---|---|
| grantType | String (Required) | client_credentials: The client can request an access token using only its client credentials. |
| additionalInfo | Object (Optional) | Additional Information |
{
"grantType": "client_credentials",
"additionalInfo": {}
}
Response Body
| Field Name | Field Type | Field Description |
|---|---|---|
| accessToken | String (Conditional) | A string representing an authorization issued to the client that used to access protected resources. Will only be returned if API call is successful. |
| additionalInfo | String (Conditional) | Addtional Info. |
| expiresIn | String (Conditional) | Time duration when the accessToken will expire. (default = 900 second). Will only be returned if API call is successful. |
| responseCode | String (Required) | Debug message to provide more information. |
| responseMessage | String (Required) | Debug message to provide more information. |
| tokenType | String (Conditional) | The access token type provides the client with the information required to successfully utilize the access token to make a protected resource request. Will only be returned if API call is successful. |
{
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6IjIwMjQwMDM5NiIsImNsaWVudEtleSI6ImM2MmNiMDNkLWUyNGQtNDdhYi1iMmFlLWUzZWY3ZjQ4N2NlMiIsImV4cCI6MTczNjE2MzEzNCwiaWF0IjoxNzM2MTYyMjM0LCJqdGkiOiJmYmE1ODdhZC0yMDk2LTRiMzktYTE4Zi1mNWQzNTAyMGQzNGEiLCJuYmYiOjE3MzYxNjIyMzR9.WUu19pQXdk0ippqIgvwjRD2V1AQSsjmj3rfuzj9H6xQPhGcqcNA7hQ-GUUj5uFSr72u_8o-2jJwbYqpyewgIYXm-T8oi26lwymUP4TgEoNHr0RyLRjAzQ0XSmzpkNmxKE4X41J_pFX1tlYms33Qw8IXWGAJPztNBNO2ssD8yM0w",
"additionalInfo": {},
"expiresIn": "900",
"responseCode": "2007300",
"responseMessage": "Successful",
"tokenType": "Bearer"
}
List Response Code
| Response Code | HTTP Status | Description |
|---|---|---|
| 2007300 | 200 | Successful |
| 4007302 | 400 | Invalid Signature |
| 5007300 | 500 | Internal Server Error |
Payment Notification
| URL and Path | |
|---|---|
| Path | [merchant_endpoint]/api/v1.0/qr/qr-mpm-notify |
| HTTP Method | POST |
| Version | v1.0 |
| Service Code | 52 |
Request Header
| Field Name | Field Type | Field Description |
|---|---|---|
| Content-Type | String (Required) | Type of the content. |
| Authorization | String (Required) | Represents access_token of a request; string starts with keyword “Bearer ” followed by access_token. Can get this token from Access Token B2B response. |
| X-TIMESTAMP | String (Required) | Using ISO 8601 as timestamp format. Transaction date time, in format YYYYMMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time). |
| X-SIGNATURE | String (Required) | Created using symmetric signature HMAC_SHA512 algorithm. |
| X-PARTNER-ID | String (Required) | Unique ID for a partner (client_id). |
| X-EXTERNAL-ID | String (Required) | Merchant’s unique ID per transaction request. |
| CHANNEL-ID | String (Required) | PJP’s channel id. |
Request Body
| Field Name | Field Type | Field Description |
|---|---|---|
| additionalInfo | Object (Optional) | Additional Information |
| additionalInfo.rrn | String (Conditional) | Unique reference number |
| amount | Object (Required) | Amount Object |
| currency | String (Required) | Transaction currency. |
| value | String (Required) | Transaction amount. |
| externalStoreID | String (Optional) | Unique identifier from External Store. |
| latestTransactionStatus | String (Required) | Latest Transaction Status. 00 (Success) 03 (Pending) 06 (Failed) 08 (Expired) |
| originalPartnerReferenceNo | String (Required) | Original transaction identifier on service consumer system. |
| originalReferenceNo | String (Required) | Original transaction identifier on service provider system.. |
| transactionStatusDesc | String (Required) | Description Transaction Status. |
{
"additionalInfo": {
"rrn" : "513585369022"
},
"amount": {
"currency": "IDR",
"value": "12346678.00"
},
"externalStoreID": "",
"latestTransactionStatus": "00",
"originalPartnerReferenceNo": "abcdefgh0017",
"originalReferenceNo": "T24080000027",
"transactionStatusDesc": "Success"
}
Response Body
| Field Name | Field Type | Field Description |
|---|---|---|
| responseCode | String(7) (Required) | Status code of transaction charge result |
| responseMessage | String(150) (Required) | Description of transaction charge result. |
{
"responseCode":"2005200",
"responseMessage":"Successful"
}
List Response Code
| Response Code | HTTP Status | Description |
|---|---|---|
| 2005200 | 200 | Successful |
| 4005201 | 400 | Invalid Format |
