Credit Card
Endpoint:
https://api.cronosengine.com/api/credit-card
Method : POST
Simplify Credit Card Payments with Our Seamless API Integration. Enhance your payment acceptance capabilities by integrating our API for seamless credit card transactions. Streamline the checkout process for your customers, offering a convenient and widely accepted payment method. Expand your customer base, boost conversion rates, and provide a secure and efficient credit card payment option. Experience the ease of accepting credit card payments with our user-friendly API.
Request Parameters
| Parameter | Mandatory | Description |
|---|---|---|
| reference | Yes | A unique reference number or identifier for the transaction. all transaction references should be unique. |
| phoneNumber | Yes | Transaction bills will be sent to this telephone number. |
| amount | Yes | Amount your user should paid to complete the transaction. |
| expiryMinutes | No | If you want the transaction to last for 1 hour, you would set the value of the expiryMinutes parameter to 60. |
| viewName | Yes | The name or identifier of the receiver for the transaction. |
| additionalInfo.callback | Yes | The callback URL where notifications or updates related to the transaction will be sent. |
Headers
| Key | Value |
|---|---|
| On-Key | Project Key |
| On-Token | Project Token |
| On-Signature | Generated using : hash_hmac('sha512', key + json_encode(body), token) |
| Accept | application/json |
Response Parameters
| Parameter | Description |
|---|---|
| responseCode | The HTTP response code indicating the status of the request. you can see the detailed information in the Error Codes Section. |
| responseMessage | A descriptive message indicating the status of the request. |
| responseData | An object containing the data related to the transaction response. |
| responseData.id | Cronos unique identifier for the transaction. |
| responseData.status | The current status of the transaction. success, pending, expired, failed |
| responseData.feePayer | The party responsible for paying the transaction fee. customer, merchant |
| responseData.amount | The original amount associated with the transaction. |
| responseData.fee | The fee charged for the transaction. |
| responseData.totalAmount | The total amount (original amount + fee) for the transaction. |
| responseData.expiredDate | The date and time when the transaction will expire. |
| responseData.additionalInfo.callback | The callback URL where notifications or updates related to the transaction will be sent. |
| responseData.creditCard.url | The link used to redirect to the payment page |
Example
Request
- cURL
curl --location 'https://api.cronosengine.com/api/credit-card' \
--header 'On-Key;' \
--header 'On-Token;' \
--header 'On-Signature;' \
--data '{
"reference": "123456",
"phoneNumber":"082195395779",
"amount": 10000,
"expiryMinutes": 30,
"viewName": "Mr. Gentur",
"additionalInfo": {
"callback": "http://your-site-callback.com/notify"
}
}'
Response
{
"responseCode": 200,
"responseMessage": "success",
"responseData": {
"id": "2930fd75-ea2b-40ca-ad50-f4d3c95422ed",
"merchantRef": "123456",
"status": "pending",
"feePayer": "customer",
"amount": 100000,
"fee": 3000,
"totalAmount": 103000,
"expiredDate": "2023-07-13T11:05:39+07:00",
"additionalInfo": {
"callback": "http://your-site-callback.com/notify"
},
"creditCard": {
"url": "https://pay-stg.oyindonesia.com/b4748fc6-8033-4ea7-9455-17ac31179eac"
}
}
}