### Subscription IPN Example
Source: https://readme.centrobill.com/docs/instant-payment-notification-ipn
An example JSON payload for a subscription-related IPN, including consumer details, metadata, and subscription status.
```json
{
"consumer": {
"id": "111111954",
"email": "jonny.sonny@gmail.com",
"firstName": "Jonny",
"lastName": "Sonny",
"country": "USA",
"zip": "11166"
},
"metadata": {
"chargeId": "eef1fc1c-bfc1-110a-1111-15a14fa1111673"
},
"subscription": {
"id": "111111222",
"cycle": 0,
"status": "canceled",
"cancelDate": "2024-10-01 20:11:44",
"timezone": "+02:00",
"eventTime": "2024-09-30 17:32:25"
}
}
```
--------------------------------
### API Response Example for Credit Action
Source: https://readme.centrobill.com/docs/payment-action-credit
Example JSON response structure for a successful credit operation.
```json
"payment": {
"code": 0,
"description": "Approved",
"action": "credit",
"mode": "refund",
"status": "success",
"amount": 11.5,
"currency": "USD",
"orderId": "2390508062",
"transactionId": "402276940",
"descriptor": "Eurobill",
"parentTransactionId": "394143534",
"source": {
"method": "card",
"number": "475144****0101",
"paymentAccountId": "3433e2ba-01d2-4e1e-a6c7-2a5fb69cea78",
"brand": "visa"
},
"timestamp": {
"dateTime": "2022-08-25 10:37:06",
"timezone": "+00:00",
"unixTime": 1661423826
}
},
"consumer": {
"id": "55818844",
"email": "luc@sky.com",
"firstName": "MR D",
"lastName": "GRAY",
"country": "GBR",
"zip": "MK42BU"
},
"metadata": {
"api_request_id": "62ddb03aa0e9e"
}
}
```
--------------------------------
### IPN Mode and Status Example
Source: https://readme.centrobill.com/docs/process-ipn
Example of the payment mode and status fields used to verify transaction outcomes.
```json
"mode": "sale",
"status": "success"
```
--------------------------------
### Chargeback IPN Example
Source: https://readme.centrobill.com/docs/payment-action-chargeback
An example of an Instant Payment Notification (IPN) payload for a chargeback event.
```APIDOC
## Chargeback IPN Example
This is an example of the JSON payload received via Instant Payment Notification (IPN) for a chargeback event.
### Request Body Example
```json
{
"payment": {
"code": 0,
"description": "Approved",
"action": "chargeback",
"mode": "chargebackFirst",
"status": "success",
"amount": 11.5,
"currency": "USD",
"orderId": "2392798616",
"transactionId": "403790714",
"descriptor": "Eurobill",
"parentTransactionId": "399698396",
"source": {
"method": "card",
"number": "420191****1868",
"paymentAccountId": "d8c24966-6de8-43ea-bae3-44edba9f4195",
"brand": "visa"
},
"timestamp": {
"dateTime": "2022-08-31 00:15:33",
"timezone": "+00:00",
"unixTime": 1661904933
}
},
"consumer": {
"id": "55628192",
"email": "luc@sky.com",
"firstName": "Luc",
"lastName": "Sky",
"country": "IDN",
"zip": "40534"
},
"metadata": {
"api_request_id": "6282aef261a59"
}
}
```
```
--------------------------------
### API Response Example for Charge Action
Source: https://readme.centrobill.com/docs/payment-action-charge
Example JSON response structure returned by the API for a successful sale charge action.
```json
"payment": {
"code": "0",
"description": "APPROVED",
"action": "charge",
"url": "https://google.com/oijhflsfs9",
"mode": "sale",
"status": "success",
"amount": 9.99,
"currency": "USD",
"orderId": "235324530",
"transactionId": "12345",
"descriptor": "centrohelp.com",
"source": {}
}
```
--------------------------------
### Free Trial with Recurring Subscription
Source: https://readme.centrobill.com/docs/create-different-skus
Configure a SKU that offers a free trial period before automatically starting a recurring subscription. Ensure the 'repeat' field is set to true for the recurring price.
```json
{
"sku": {
"siteId": "12345",
"title": "Free trial for 3 days, then recurring 1 USD every 30 days",
"price": [
{
"offset": "3d",
"amount": 1,
"currency": "USD",
"repeat": false
},
{
"offset": "30d",
"amount": 1,
"currency": "USD",
"repeat": true
}
]
}
}
```
--------------------------------
### Get Consumer cURL Request
Source: https://readme.centrobill.com/reference/getconsumer
Use this cURL command to make a GET request to retrieve consumer details. Ensure you replace '{id}' with the actual consumer ID.
```shell
curl --request GET \
--url https://api.centrobill.com/consumer/id \
--header 'accept: application/json'
```
--------------------------------
### Execute Hosted Payment Request via cURL
Source: https://readme.centrobill.com/reference/generateurltopaymentpage
A multi-part cURL request example for initiating a payment page session.
```Shell
curl --request POST \
```
```Shell
--url https://api.centrobill.com/paymentPage \
```
```Shell
--header 'accept: application/json' \
```
```Shell
--header 'content-type: application/json'
```
--------------------------------
### Transaction IPN Example
Source: https://readme.centrobill.com/docs/instant-payment-notification-ipn
An example JSON payload for a transaction-related IPN, including payment details, consumer information, and metadata.
```json
{
"payment": {
"code": 5082,
"description": "Negative online CAM, dCVV, iCVV, CVV, or CAVV results or Offline PIN authentication interrupted",
"action": "charge",
"mode": "sale",
"status": "fail",
"codeCategory": 3,
"amount": 12.09,
"currency": "USD",
"orderId": "2525616924",
"transactionId": "718641118",
"descriptor": "TRO***029",
"source": {
"method": "card",
"number": "518868****7707",
"paymentAccountId": "1ac7f157-a334-4276-ae52-67f7e70e96c4",
"brand": "mastercard",
"expirationMonth": "**",
"expirationYear": "**",
"disabled": false,
"bankName": "BENDIGO AND ADELAIDE BANK, LTD.",
"bankCountry": "AUS"
},
"apiPaymentSource": "paymentAccountId",
"timestamp": {
"dateTime": "2025-10-21 11:50:34",
"timezone": "+02:00",
"unixTime": 1761040234
},
"vat": {
"amount": 0,
"amountUsd": 0
}
},
"consumer": {
"id": "151925232",
"email": "lc***rn@gmail.com",
"firstName": "Lachlan",
"lastName": "C",
"country": "AUS",
"state": "NSW",
"zip": "***"
},
"metadata": {
"orderId": "6***1"
}
}
```
--------------------------------
### Get Subscription cURL Request
Source: https://readme.centrobill.com/reference/getsubscription
Use this cURL command to make a GET request to retrieve subscription details. Ensure you replace '{id}' with a valid subscription ID.
```shell
curl --request GET \
--url https://api.centrobill.com/subscription/id \
--header 'accept: application/json'
```
--------------------------------
### Get product (SKU)
Source: https://readme.centrobill.com/reference/getproduct
Retrieves product information using its SKU name. Supports various error responses for different failure scenarios.
```APIDOC
## GET /sku/{name}
### Description
Retrieves product information based on the provided SKU name.
### Method
GET
### Endpoint
https://api.centrobill.com/sku/{name}
### Parameters
#### Path Parameters
- **name** (string) - Required - SKU name that you added when creating SKU. Length between 5 and 36 characters.
#### Headers
- **X-Request-ID** (string) - Unique ID of request.
### Responses
#### Success Response (200)
- **Created** (string) - Indicates successful retrieval.
#### Error Responses
- **400** Bad Request
- **401** Unauthorized
- **403** Forbidden
- **500** Internal Server Error
### Request Example
```shell
curl --request GET \
--url https://api.centrobill.com/sku/name \
--header 'accept: application/json'
```
### Response Example (200 OK)
```json
{
"example": "response body"
}
```
```
--------------------------------
### API Response Example for Redirect Action
Source: https://readme.centrobill.com/docs/payment-action-redirect
This JSON object illustrates a typical API response when using the redirect action for a sale. It includes details about the payment, consumer, and metadata.
```json
{
"payment": {
"code": 0,
"description": "Approved",
"action": "redirect",
"mode": "sale",
"status": "pending",
"amount": 9,
"currency": "EUR",
"orderId": "2394649562",
"transactionId": "404168112",
"descriptor": "Eurobill",
"url": "https://ts.google.com/api/v2/ProcessTxSend3DS?key3ds=08a44a9a67efb2b01e824a80d712dc1e",
"source": {
"method": "card",
"number": "513284****9161",
"paymentAccountId": "760bdbd7-ce10-4478-9819-3a6aa623bef3",
"brand": "mastercard"
},
"apiPaymentSource": "card",
"timestamp": {
"dateTime": "2022-09-01 11:01:55",
"timezone": "+00:00",
"unixTime": 1662030115
}
},
"consumer": {
"id": "100059330",
"email": "luc@sky.be",
"firstName": "Ghislain",
"lastName": "o'reilly",
"country": "DEU",
"city": "Berlin",
"zip": "10115"
},
"metadata": {
"trackingId": "1662030023252"
}
}
```
--------------------------------
### Chargeback IPN Example
Source: https://readme.centrobill.com/docs/payment-action-chargeback
This JSON object represents an Instant Payment Notification (IPN) for a chargeback event, specifically a 'chargebackFirst' mode. It includes details about the payment, consumer, and metadata.
```json
{
"payment": {
"code": 0,
"description": "Approved",
"action": "chargeback",
"mode": "chargebackFirst",
"status": "success",
"amount": 11.5,
"currency": "USD",
"orderId": "2392798616",
"transactionId": "403790714",
"descriptor": "Eurobill",
"parentTransactionId": "399698396",
"source": {
"method": "card",
"number": "420191****1868",
"paymentAccountId": "d8c24966-6de8-43ea-bae3-44edba9f4195",
"brand": "visa"
},
"timestamp": {
"dateTime": "2022-08-31 00:15:33",
"timezone": "+00:00",
"unixTime": 1661904933
}
},
"consumer": {
"id": "55628192",
"email": "luc@sky.com",
"firstName": "Luc",
"lastName": "Sky",
"country": "IDN",
"zip": "40534"
},
"metadata": {
"api_request_id": "6282aef261a59"
}
}
```
--------------------------------
### GET /site/{id}
Source: https://readme.centrobill.com/reference/getsite
Retrieves the details of a specific gateway site using its unique ID.
```APIDOC
## GET /site/{id}
### Description
Retrieves information about a specific gateway site created on the Merchant portal.
### Method
GET
### Endpoint
https://api.centrobill.com/site/{id}
### Parameters
#### Path Parameters
- **id** (string) - Required - Gateway site ID (length between 5 and 36).
### Response
#### Success Response (200)
- OK
#### Error Responses
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 500: Internal Server Error
```
--------------------------------
### Display Apple Pay Button (Frontend)
Source: https://readme.centrobill.com/docs/integrate-apple-pay
Include the Apple Pay SDK and use JavaScript to check for Apple Pay support and display the payment button. This code handles the initial setup and event listeners for the button click.
```html
```
--------------------------------
### Token Example for Reusable Payment Methods
Source: https://readme.centrobill.com/docs/express-checkout-flow
This JSON snippet shows the format of a payment account token. This token can be used for future transactions, allowing users to avoid re-entering their payment details.
```json
{
"paymentAccountId": "f3ad604e-1ab1-40a4-a24d-5cb1f6f5a38b"
}
```
--------------------------------
### Get Test Payment Data (cURL)
Source: https://readme.centrobill.com/reference/getlistoftestpaymentdata
Use this cURL command to retrieve a list of test payment data. Ensure you include the 'accept' header for JSON responses.
```shell
curl --request GET \
--url https://api.centrobill.com/testPaymentData \
--header 'accept: application/json'
```
--------------------------------
### GET /currency-exchange-rate/{iso3}
Source: https://readme.centrobill.com/reference/getexchangeratebyiso3
Retrieves the current exchange rate for a specific currency identified by its ISO3 code.
```APIDOC
## GET /currency-exchange-rate/{iso3}
### Description
Retrieves the exchange rate for a specified currency using its ISO3 code.
### Method
GET
### Endpoint
https://api.centrobill.com/currency-exchange-rate/{iso3}
### Parameters
#### Path Parameters
- **iso3** (string) - Required - Currency of operation in ISO3 format
### Response
#### Success Response (200)
- OK
#### Error Responses
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 500: Internal Server Error
```
--------------------------------
### GET /antifraud/verification/{phone}
Source: https://readme.centrobill.com/reference/getavailablechannelsofcodeverification
Retrieves the available channels for code verification for a given consumer phone number.
```APIDOC
## GET /antifraud/verification/{phone}
### Description
Retrieves the available channels for code verification for a specific consumer phone number.
### Method
GET
### Endpoint
https://api.centrobill.com/antifraud/verification/{phone}
### Parameters
#### Path Parameters
- **phone** (string) - Required - Consumer's phone number. Must start with an optional '+' sign, followed by up to 16 digits. The first digit (after '+' if present) must be between 1 and 9.
### Response
#### Success Response (200)
- OK
#### Error Responses
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 500: Internal Server Error
```
--------------------------------
### IPN Decline Code Example
Source: https://readme.centrobill.com/docs/process-ipn
Example of the JSON structure returned when a transaction is declined.
```json
"code": 5013,
"description": "Invalid amount"
```
--------------------------------
### Enable Payment Account for Quick-Sale
Source: https://readme.centrobill.com/reference/enablepaymentaccountforquicksale
Use this endpoint to enable a payment account for quick-sale transactions. Ensure the paymentAccountId is correctly provided in the URL.
```shell
curl --request POST \
--url https://api.centrobill.com/paymentAccount/paymentAccountId/enable \
--header 'accept: application/json'
```
--------------------------------
### Retrieve Product by SKU via cURL
Source: https://readme.centrobill.com/reference/getproduct
Use this request to fetch product details. Ensure the SKU name is correctly specified in the URL path.
```Shell
curl --request GET \
--url https://api.centrobill.com/sku/name \
--header 'accept: application/json'
```
--------------------------------
### Implement Readiness Check
Source: https://readme.centrobill.com/docs/set-up-google-pay-integration
Use the isReadyToPayRequest object and the corresponding JavaScript call to verify if Google Pay is available for the user.
```json
{
"apiVersion": 2,
"apiVersionMinor": 0,
"allowedPaymentMethods": [
{
"type": "CARD",
"parameters": {
"allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
"allowedCardNetworks": ["VISA", "MASTERCARD", "MAESTRO"]
}
}
]
}
```
```javascript
paymentsClient.isReadyToPay(isReadyToPayRequest)
```
--------------------------------
### Create Product (SKU) - cURL Request
Source: https://readme.centrobill.com/reference/createproduct
Use this cURL command to create a new product (SKU) via the API. Ensure the 'type' parameter is set to 'subscription' for recurring products.
```shell
curl --request POST \
--url https://api.centrobill.com/sku \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"type": "subscription"
}'
```
--------------------------------
### Initial Payment with Token
Source: https://readme.centrobill.com/docs/making-a
Request body for making an initial payment using the generated token. This confirms the token's validity and links it to a payment.
```json
{
"paymentSource": {
"type": "token",
"value": "d86bdcbb-c369-46d9-a9d0-9c5010e3bfdb"
}
}
```
--------------------------------
### POST /sku - Create Product (SKU)
Source: https://readme.centrobill.com/reference/product
This endpoint allows you to create a new product or SKU. You can define whether it's a recurring subscription or a one-time purchase, along with pricing and other details.
```APIDOC
## POST /sku
### Description
Creates a new product (SKU) for your Centrobill account. This can be a subscription-based product or a one-time purchase.
### Method
POST
### Endpoint
https://api.centrobill.com/sku
### Parameters
#### Request Body
- **type** (enum) - Required - Specifies the product type. Allowed values: `subscription`.
- **siteId** (string) - Required - The Gateway site ID. Must be between 5 and 36 characters long.
- **title** (string) - Required - The product description shown on the payment page. Must be between 3 and 128 characters long.
- **externalId** (string) - Optional - Your merchant SKU ID. Must be between 3 and 36 characters long.
- **price** (array of objects) - Required - An array of price objects for the product.
### Request Example
```json
{
"type": "subscription",
"siteId": "your_site_id",
"title": "Premium Subscription",
"externalId": "PREM_SUB_001",
"price": [
{
"amount": 1000,
"currency": "USD"
}
]
}
```
### Responses
#### Success Response (200)
- **message** (string) - Confirmation message.
#### Error Responses
- **400** Bad Request: The request was malformed or invalid.
- **401** Unauthorized: Authentication credentials were not provided or were invalid.
- **403** Forbidden: The authenticated user does not have permission to perform this action.
- **500** Internal Server Error: An unexpected error occurred on the server.
```
--------------------------------
### Get IPN for Transaction ID (cURL)
Source: https://readme.centrobill.com/reference/gettransactionidipn
Use this cURL command to make a GET request to retrieve the IPN for a given transaction ID. Ensure you replace '{id}' with the actual transaction ID.
```shell
curl --request GET \
--url https://api.centrobill.com/transaction/id/ipn \
--header 'accept: application/json'
```
--------------------------------
### cURL Request to Get Repaid Link
Source: https://readme.centrobill.com/reference/getchargebackidrepaidlink
Use this cURL command to make a GET request to retrieve a repaid link for a specific chargeback ID. Ensure the 'accept' header is set to 'application/json'.
```shell
curl --request GET \
--url https://api.centrobill.com/chargeback/id/repaidLink \
--header 'accept: application/json'
```
--------------------------------
### Get Consumer Limit cURL Request
Source: https://readme.centrobill.com/reference/getlimit
Use this cURL command to make a GET request to the Centrobill API to retrieve a consumer's limit. Ensure you replace '{id}' with the actual consumer ID.
```shell
curl --request GET \
--url https://api.centrobill.com/consumer/id/limit \
--header 'accept: application/json'
```
--------------------------------
### POST /payment - Submit Initial Payment
Source: https://readme.centrobill.com/docs/tokenization-quickstart
Submit a server-to-server payment request using a previously obtained token. This endpoint requires your API key for authorization.
```APIDOC
## POST /payment
### Description
Submits a server-to-server payment request using a token obtained from a previous step. Requires API key authentication.
### Method
POST
### Endpoint
https://stage.api.centrobill.com/payment
### Parameters
#### Headers
- **Authorization** (string) - Required - Your API key.
- **Content-Type** (string) - Required - Must be `application/json`.
#### Request Body
- **paymentSource** (object) - Required - Details about the payment source.
- **type** (string) - Required - Must be `"token"`.
- **token** (string) - Required - The token obtained from Step 1.
- **sku** (object) - Required - Details about the product or service.
- **title** (string) - Required - The name of the SKU.
- **siteId** (string) - Required - Your site ID from the Merchant Portal.
- **price** (array) - Required - An array of price objects.
- **offset** (string) - Required - e.g., `"0d"` for immediate charge.
- **amount** (number) - Required - The price amount.
- **currency** (string) - Required - The currency code (e.g., `"USD"`).
- **repeat** (boolean) - Required - Whether the price repeats.
- **consumer** (object) - Required - Details about the customer.
- **id** (string) - Required - Your internal user ID.
- **email** (string) - Required - The customer's email address.
- **firstName** (string) - Optional - The customer's first name.
- **lastName** (string) - Optional - The customer's last name.
- **country** (string) - Optional - The customer's country.
- **ip** (string) - Required - The customer's IP address for fraud detection.
- **url** (object) - Required - URLs for callbacks and redirects.
- **ipnUrl** (string) - Required - Your IPN endpoint for payment status updates.
- **redirectUrl** (string) - Required - The URL to redirect the customer after payment.
### Request Example
```json
{
"paymentSource": {
"type": "token",
"token": "d86bdcbb-c369-46d9-a9d0-9c5010e3bfdb"
},
"sku": {
"title": "Premium Monthly",
"siteId": "983759353",
"price": [
{
"offset": "0d",
"amount": 19.99,
"currency": "USD",
"repeat": false
}
]
},
"consumer": {
"id": "user-00123",
"email": "jonny.sonny@example.com",
"firstName": "Jonny",
"lastName": "Sonny",
"country": "USA",
"ip": "203.0.113.45"
},
"url": {
"ipnUrl": "https://your-server.example.com/webhooks/centrobill",
"redirectUrl": "https://your-server.example.com/payment/success"
}
}
```
### Response
#### Success Response (201)
- **payment** (object) - Details about the payment transaction.
- **code** (string) - Response code.
- **description** (string) - Response description.
- **action** (string) - The action performed (e.g., `"charge"`).
- **mode** (string) - The mode of the transaction (e.g., `"sale"`).
- **status** (string) - The status of the payment (`"success"`, `"pending"`, `"fail"`).
- **amount** (number) - The charged amount.
- **currency** (string) - The currency code.
- **orderId** (string) - The order identifier.
- **transactionId** (string) - The transaction identifier.
- **source** (object) - Details about the payment source.
- **method** (string) - Payment method (e.g., `"card"`).
- **number** (string) - Masked card number.
- **brand** (string) - Card brand (e.g., `"visa"`).
- **bankName** (string) - Name of the issuing bank.
- **bankCountry** (string) - Country code of the issuing bank.
- **expirationMonth** (integer) - Card expiration month.
- **expirationYear** (integer) - Card expiration year.
- **paymentAccountId** (string) - Stored payment account identifier.
- **disabled** (boolean) - Indicates if the payment account is disabled.
- **consumer** (object) - Details about the consumer.
- **id** (string) - Centrobill gateway consumer ID.
- **externalId** (string) - Your internal user ID.
- **email** (string) - The customer's email address.
- **subscription** (object) - Details about the subscription, if applicable.
- **id** (string) - Subscription identifier.
- **status** (string) - Subscription status (e.g., `"active"`).
- **renewalDate** (string) - The date of the next renewal.
#### Response Example
```json
{
"payment": {
"code": "0",
"description": "APPROVED",
"action": "charge",
"mode": "sale",
"status": "success",
"amount": 19.99,
"currency": "USD",
"orderId": "235324530",
"transactionId": "12345",
"source": {
"method": "card",
"number": "402400****6348",
"brand": "visa",
"bankName": "BENDIGO AND ADELAIDE BANK, LTD",
"bankCountry": "AUS",
"expirationMonth": 2,
"expirationYear": 27,
"paymentAccountId": "d86bdcbb-c369-46d9-a9d0-9c5010e3bfdb",
"disabled": true
}
},
"consumer": {
"id": "cb-gateway-id",
"externalId": "user-00123",
"email": "jonny.sonny@example.com"
},
"subscription": {
"id": "sub-abc123",
"status": "active",
"renewalDate": "2025-01-17 13:43:02"
}
}
```
```
--------------------------------
### Get Subscription
Source: https://readme.centrobill.com/reference/getsubscription
Retrieves details of a specific subscription using its ID.
```APIDOC
## GET /subscription/{id}
### Description
Retrieves the details of a specific subscription.
### Method
GET
### Endpoint
https://api.centrobill.com/subscription/{id}
### Parameters
#### Path Parameters
- **id** (string) - Required - Subscription ID. Length between 5 and 36 characters.
#### Headers
- **X-Request-ID** (string) - Unique ID of the request.
### Responses
#### Success Response (200)
OK
#### Error Responses
- **400** Bad Request
- **401** Unauthorized
- **403** Forbidden
- **404** Not Found
- **500** Internal Server Error
### Request Example
```json
{
"example": ""
}
```
### Response Example
#### Success Response (200)
```json
{
"example": ""
}
```
```
--------------------------------
### GET /consumer/{id}/limit
Source: https://readme.centrobill.com/reference/getlimit
Retrieves the limit information for a specific consumer.
```APIDOC
## GET /consumer/{id}/limit
### Description
Retrieves the limit of a consumer based on their ID.
### Method
GET
### Endpoint
https://api.centrobill.com/consumer/{id}/limit
### Parameters
#### Path Parameters
- **id** (string) - required - Gateway consumer ID (user ID). Length between 5 and 36 characters.
#### Headers
- **X-Request-ID** (string) - Unique ID of request.
### Responses
#### Success Response (200)
OK
#### Error Responses
- **400** Bad Request
- **401** Unauthorized
- **403** Forbidden
- **500** Internal Server Error
### Request Example
```shell
curl --request GET \
--url https://api.centrobill.com/consumer/id/limit \
--header 'accept: application/json'
```
```
--------------------------------
### GET /currency-exchange-rate
Source: https://readme.centrobill.com/reference/getcurrencyexchangerates
Retrieves the list of currency exchange rates from the CentroBill platform.
```APIDOC
## GET /currency-exchange-rate
### Description
Retrieves a list of current currency exchange rates.
### Method
GET
### Endpoint
https://api.centrobill.com/currency-exchange-rate
### Parameters
#### Headers
- **X-Request-ID** (string) - Optional - Unique ID of request
### Response
#### Success Response (200)
- **OK** - Successfully retrieved currency exchange rates.
#### Error Responses
- **400** - Bad Request
- **401** - Unauthorized
- **403** - Forbidden
- **500** - Internal Server Error
```
--------------------------------
### GET /v2/lookup
Source: https://readme.centrobill.com/reference/getpayments
Retrieves a feed of payment transactions based on various query parameters.
```APIDOC
## GET /v2/lookup
### Description
Retrieves a list of payments from the transaction feed. Supports pagination and extensive filtering by date, IDs, and transaction attributes.
### Method
GET
### Endpoint
https://feed.centrobill.com/v2/lookup
### Parameters
#### Query Parameters
- **dateFrom** (string) - Optional - Format: Y-m-d
- **dateTo** (string) - Optional - Format: Y-m-d
- **limit** (integer) - Optional - Per page limit
- **page** (integer) - Optional - Page number
- **orderId** (string) - Optional - Order Id
- **transactionId** (string) - Optional - Transaction Id
- **lastTransactionId** (string) - Optional - Transaction id
- **ustas** (string) - Optional - Consumer Id
- **systemId** (string) - Optional - System Id
- **uuid** (string) - Optional - Transaction uuid
- **lastUuid** (string) - Optional - Transaction uuid
- **siteName** (string) - Optional - Site name
- **fields** (string) - Optional - Selected fields. Comma separated string, with 'dot' notation.
- **ignored** (string) - Optional - Ignored fields. Comma separated string, with 'dot' notation.
- **status** (array of strings) - Optional - Payment status
- **mode** (array of strings) - Optional - Transaction mode
- **cardLast4Digits** (string) - Optional - Card last 4 digits (length 4)
- **externalTransactionId** (string) - Optional - Biller transaction ID
- **gatewayAmount** (number) - Optional - Payment amount
- **gatewayCurrency** (string) - Optional - Payment currency
- **gatewayPricePercentDiff** (number) - Optional - Price percent diff used for lower and upper bound
- **loadAll** (boolean) - Optional - Parameter to skip pagination & load full feed
- **paymentType** (string) - Optional - Payment currency
- **prevTransactionId** (string) - Optional - Prev transaction ID
- **cardBin** (string) - Optional - Card BIN (length 6)
### Response
#### Success Response (200)
- **Lookup body** (object) - Returns the transaction feed data.
#### Error Responses
- **401/403/422/500** (object) - JSON error object
```
--------------------------------
### Submit Initial Payment Request
Source: https://readme.centrobill.com/docs/tokenization-quickstart
Use this cURL command to submit a server-to-server payment request after obtaining a token. Ensure your API key is included in the Authorization header.
```json
curl --request POST \
--url https://stage.api.centrobill.com/payment \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{ \
"paymentSource": { \
"type": "token", \
"token": "d86bdcbb-c369-46d9-a9d0-9c5010e3bfdb" \
}, \
"sku": { \
"title": "Premium Monthly", \
"siteId": "983759353", \
"price": [ \
{ \
"offset": "0d", \
"amount": 19.99, \
"currency": "USD", \
"repeat": false \
} \
] \
}, \
"consumer": { \
"id": "user-00123", \
"email": "jonny.sonny@example.com", \
"firstName": "Jonny", \
"lastName": "Sonny", \
"country": "USA", \
"ip": "203.0.113.45" \
}, \
"url": { \
"ipnUrl": "https://your-server.example.com/webhooks/centrobill", \
"redirectUrl": "https://your-server.example.com/payment/success" \
} \
}'
```
--------------------------------
### GET /testPaymentData/{id}
Source: https://readme.centrobill.com/reference/gettestpaymentdatabyid
Retrieves test payment data by providing the unique ID of the record.
```APIDOC
## GET /testPaymentData/{id}
### Description
Retrieves test payment data by providing the unique ID of the record.
### Method
GET
### Endpoint
https://api.centrobill.com/testPaymentData/{id}
### Parameters
#### Path Parameters
- **id** (string) - Required - Test payment data ID
### Response
#### Success Response (200)
- OK
#### Error Responses
- 401: Unauthorized
- 404: Not found
- 500: Internal Server Error
```
--------------------------------
### Create test payment data via cURL
Source: https://readme.centrobill.com/reference/createtestpaymentdata
Sends a POST request to the testPaymentData endpoint to generate payment credentials. Ensure the request includes the required type, emulate3ds, and currency parameters in the JSON body.
```Shell
curl --request POST \
--url https://api.centrobill.com/testPaymentData \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"type": "visa",
"emulate3ds": true,
"currency": "USD"
}
'
```
--------------------------------
### POST /site
Source: https://readme.centrobill.com/reference/createsite
Creates a new merchant site in the CentroBill system. Requires specific site details and callback URLs.
```APIDOC
## POST /site
### Description
Creates a new merchant site. This endpoint allows you to register a new website URL and configure its associated IPN and redirect settings.
### Method
POST
### Endpoint
https://api.centrobill.com/site
### Parameters
#### Headers
- **X-Request-ID** (string) - Optional - Unique ID of request
#### Request Body
- **name** (string) - Required - URL without protocol prefix
- **externalId** (string) - Optional - Merchant site ID (length between 3 and 36)
- **ipnUrl** (url) - Required - The Instant payment notification (aka IPN or callback) will be sent to this URL after purchase
- **redirectUrl** (url) - Optional - User will be redirected to this URL after purchase
- **clientId** (string) - Optional - If you have multiple clientId values, specify the one for which you want to create the website
### Response
#### Success Response (200)
- OK
#### Error Responses
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 500: Internal Server Error
```
--------------------------------
### Get Consumer (User)
Source: https://readme.centrobill.com/reference/getconsumer
Retrieves a specific consumer's details using their unique ID.
```APIDOC
## GET /consumer/{id}
### Description
Retrieves the details of a specific consumer (user) using their unique identifier.
### Method
GET
### Endpoint
https://api.centrobill.com/consumer/{id}
### Parameters
#### Path Parameters
- **id** (string) - required - Gateway consumer ID (user ID). Length between 5 and 36 characters.
#### Headers
- **X-Request-ID** (string) - Unique ID of the request.
### Responses
#### Success Response (200)
- **OK**
#### Error Responses
- **400** Bad Request
- **401** Unauthorized
- **403** Forbidden
- **500** Internal Server Error
### Request Example
```json
{
"example": ""
}
```
### Response Example
#### Success Response (200)
```json
{
"example": "OK"
}
```
```
--------------------------------
### Create Product cURL Request
Source: https://readme.centrobill.com/reference/product
A cURL command to create a new subscription product via the Centrobill API.
```Shell
curl --request POST \
--url https://api.centrobill.com/sku \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"type": "subscription"
}
'
```
--------------------------------
### Cancel API Response Example
Source: https://readme.centrobill.com/docs/payment-action-cancel
Represents the JSON structure returned by the API when a cancel action is processed.
```json
"payment": {
"code": 0,
"description": "0000 Approved",
"action": "cancel",
"mode": "cancel",
"status": "canceled",
"reason": "Canceled by Chronos system, 5051",
"amount": "0.000",
"currency": "USD",
"orderId": "2390343640",
"transactionId": "402031670",
}
```
--------------------------------
### Get IPN for order ID
Source: https://readme.centrobill.com/reference/getorderidipn
Retrieves the Instant Payment Notification (IPN) for a specific order ID.
```APIDOC
## GET /order/{id}/ipn
### Description
Retrieves the Instant Payment Notification (IPN) for a specific order ID.
### Method
GET
### Endpoint
https://api.centrobill.com/order/{id}/ipn
### Parameters
#### Path Parameters
- **id** (string) - required - Order ID
### Responses
#### Success Response (200)
OK
#### Error Responses
- **401** - Unauthorized
- **404** - Not found
- **500** - Internal Server Error
### Request Example
```shell
curl --request GET \
--url https://api.centrobill.com/order/id/ipn \
--header 'accept: application/json'
```
```
--------------------------------
### Enable Payment Account for Quick-Sale
Source: https://readme.centrobill.com/reference/enablepaymentaccountforquicksale
Enables a payment account for quick-sale functionality. Requires the payment account ID.
```APIDOC
## POST /paymentAccount/{paymentAccountId}/enable
### Description
Enables a payment account for quick-sale functionality.
### Method
POST
### Endpoint
https://api.centrobill.com/paymentAccount/{paymentAccountId}/enable
### Parameters
#### Path Parameters
- **paymentAccountId** (string) - Required - ID of the encoded user payment details
### Request Example
```json
{
"example": "request body"
}
```
### Response
#### Success Response (200)
- **Success** (string) - Indicates a successful operation.
#### Response Example
```json
{
"example": "response body"
}
```
```
--------------------------------
### Execute Credit Request via cURL
Source: https://readme.centrobill.com/reference/credit
Use this cURL command to initiate a credit or refund for a specific transaction ID.
```Shell
curl --request POST \
--url https://api.centrobill.com/payment/id/credit \
--header 'accept: application/json' \
--header 'content-type: application/json'
```
--------------------------------
### GET /chargeback/{id}/repaidLink
Source: https://readme.centrobill.com/reference/getchargebackidrepaidlink
Retrieves a repaid link for a specific chargeback transaction identified by its ID.
```APIDOC
## GET /chargeback/{id}/repaidLink
### Description
Retrieves a repaid link for a specific chargeback transaction.
### Method
GET
### Endpoint
https://api.centrobill.com/chargeback/{id}/repaidLink
### Parameters
#### Path Parameters
- **id** (string) - Required - Chargeback transaction ID
### Response
#### Success Response (200)
- OK
#### Error Responses
- 401 (Unauthorized)
- 404 (Not found)
- 500 (Internal Server Error)
```
--------------------------------
### One-Time Authorization and Capture
Source: https://readme.centrobill.com/docs/create-different-skus
Set up a one-time authorization for a small amount that will be captured after a specified delay. This is commonly used for verifying payment methods.
```json
{
"sku": {
"siteId": "12345",
"title": "One-time 1 USD authorize (captured after 3 days)",
"price": [
{
"offset": "3d",
"amount": 1,
"currency": "USD",
"repeat": false
}
]
}
}
```
--------------------------------
### Retrieve Transaction Feed via cURL
Source: https://readme.centrobill.com/reference/getpayments
A cURL request to the transaction feed endpoint using the GET method.
```Shell
curl --request GET \
--url https://feed.centrobill.com/v2/lookup \
--header 'accept: application/json'
```