Quick Start Guide
Step 1. Getting API Credentials
Request a login and password from the Support Team. Use sandbox credentials to test and production credentials for live transactions. See Getting API Credentials for onboarding and delivery, and Access URLs for the API host in each environment.
Step 2. Authentication & Authorization
Getting Access and Refresh Tokens
Send your credentials as JSON to the authorize endpoint. Both token endpoints accept Content-Type: application/json and can be called without an access token or settlement account header.
| Action | Method and path | JSON request body |
|---|---|---|
| Sign in | POST /configuration-management/api/v1/admin-accounts/oauth/authorize | {"login":"[email protected]","password":"<password>"} |
| Refresh | POST /configuration-management/api/v1/admin-accounts/oauth/refresh-token | {"refreshToken":"<current-refresh-token>"} |
Save both tokens from the successful response. Use accessToken for merchant requests and refreshToken to obtain the next pair. See the sign-in request and response.
Updating Access Token with Refresh Token
Refresh the pair shortly before the access token's exp time. Store both values from the response and use the new refresh token for the next exchange. If your refresh token expires or is unavailable, sign in again.
Headers for Your First Merchant Request
Use Authorization: Bearer <access-token> for the operations below. For requests with a JSON body, also send Content-Type: application/json. Where required, supply the settlement account for the transaction, for example settlement-account-id: SA123. Paths in this table are relative to /processing/api/v1.
| Operations | settlement-account-id |
|---|---|
POST /intents, PATCH /payments/{id}, POST /refunds, GET /refunds/{id}, POST /disbursements/check, POST /payment-instruments | Required |
GET /payments/{id}, GET /disbursements/{id} | Not required |
Step 3: Setting Up Webhooks
Provide a publicly accessible HTTPS endpoint that accepts POST requests. Carusell uses the URL supplied for the operation first, then the settlement account's default URL. A refund has its own webhookUrl. If neither URL is set, delivery is skipped.
Carusell sends asynchronous notifications for supported status changes. Some creation errors are reported only in the API response. Handle duplicate or out-of-order notifications and use the operation's GET endpoint when you need its current status. Delivery can take up to 10 attempts, including the first. A newer notification for the same operation can supersede a pending retry.
For 3-D Secure, follow the payment method's instructions. Challenge details can arrive in the API response. See Webhooks Overview for delivery and Verify webhook signatures for a test example. Contact Support to enable signing for your settlement account.
Step 4. Creating New Transactions
Create a payment
An intent groups the payments you submit. Use POST /processing/api/v1/intents and choose the fields for your payment method. For example, the following request body submits an AlfaPay payment for RUB 100.05. Replace the example URLs with your own and choose a new clientReferenceId for each new intent.
{
"clientReferenceId": "order-10201",
"payments": [
{
"paymentInstrument": {
"paymentMethodName": "AlfaPay",
"incomingDetails": {"redirectUrl": "https://merchant.example/payment-return"}
},
"description": "Order 10201",
"webhookUrl": "https://merchant.example/webhooks/payments",
"submittedAmount": {"value": 100.05, "currency": "RUB"},
"authCurrencyCode": "RUB"
}
]
}For a direct (H2H) integration, useCheckoutForm defaults to false. For hosted checkout, set it to true and supply paymentIntent.
Inspect both payments and paymentCreationErrors on HTTP 200. One intent can contain successful and failed items. If the service cannot determine the amount of the only payment requested, the response can contain this excerpt:
{
"intentId": "10201",
"payments": [],
"paymentCreationErrors": [{"createStatusCode": "CODE_CT0002"}]
}A repeated intent clientReferenceId for the same admin account and settlement account can return HTTP 409. The state of a created payment when POST returns depends on the route. Some routes wait for a partner response, while others continue asynchronously.
Capture, cancel or check a payment
On a two-stage route, an AUTHORIZED payment can wait for an explicit capture if automatic capture is not configured. Use the payment ID from payments for both calls below.
sequenceDiagram
participant M as Merchant
participant A as Carusell API
opt Capture or cancel an authorized payment
M->>A: PATCH /processing/api/v1/payments/{id}
A-->>M: Command response
end
M->>A: GET /processing/api/v1/payments/{id}
A-->>M: Current payment detailsFor capture or cancellation, send {"status":"CAPTURED"} or {"status":"CANCELLED"} respectively. HTTP 200 can contain the text Success or Error. Even after Success, check the outcome via GET payment or a supported webhook. For example, {"id":"12001","status":"AUTHORIZED"} is a GET response excerpt for a payment whose funds are still held. An inapplicable PATCH can return 400, and an unknown payment ID can return 404 on PATCH or GET.
| Payment stage | status for new payments |
|---|---|
| In progress | ACCEPTED, AUTHORIZATION_REQUESTED, AUTHORIZED, CAPTURE_REQUESTED, CANCELLATION_REQUESTED |
| Outcome | CAPTURED, CANCELLED, DECLINED, EXPIRED, ERROR |
Refund a captured payment
Send POST /processing/api/v1/refunds with the original payment's ID. These two request bodies are independent examples for a CAPTURED payment.
Full refund. For a payment with no previous refunds, send:
{"paymentId": 12001}Partial refund. To return USD 10.00, the method must support partial refunds and the payment must have at least USD 10.00 available to refund in its submitted currency.
{
"paymentId": 12001,
"partial": true,
"paymentSubmittedAmount": {"value": 10.00, "currency": "USD"}
}Supply an amount for a partial refund. If both paymentSubmittedAmount and paymentAuthAmount are omitted, even with partial: true, the service starts with the full refundable base of the original payment. Previous refunds can then cause the request to exceed the remaining limit. For a converted payment, supply one amount in its corresponding currency and let the service calculate the other. Each amount object you send must contain a value.
If you omit currency, the service uses the currency of that side of the original payment. If you supply both amount objects, their currencies must match each other and the corresponding payment currencies. Their values must match, including the number of decimal places.
A successful partial-refund response (HTTP 200) can contain the following fields:
{
"id": "13001",
"paymentId": "12001",
"status": "ACCEPTED",
"refundSubmittedAmount": {"value": 10.00, "currency": "USD"}
}The request takes paymentId as a 64-bit integer. Preserve its full precision when serializing it, especially in JavaScript. The response returns IDs as strings. Use the refund's id for GET refund, for example GET /processing/api/v1/refunds/13001 with the same settlement account header.
sequenceDiagram
participant M as Merchant
participant A as Carusell API
M->>A: POST /processing/api/v1/refunds with paymentId
A-->>M: Created refund with its own id and status
M->>A: GET /processing/api/v1/refunds/{id}
A-->>M: Current refund detailsA refund can move from ACCEPTED directly to REFUND_ISSUED or REFUNDED. It can reach REFUND_FAILED from ACCEPTED, REFUND_REQUESTED or REFUND_ISSUED. Other outcomes include DECLINED and ERROR. A late partner confirmation can change ERROR to REFUNDED.
An invalid request can return HTTP 400 before a refund is created. A repeated clientReferenceId in the same settlement account can return 409. A separate 409 indicating that the payment is temporarily locked allows you to retry. GET returns 404 if the refund is missing in the requested, accessible account.
For an SBP refund to a specified phone and bank, send recipientPhone and recipientBankCode together. This option must be enabled for your settlement account.
Create and track a payout
To send funds to a recipient, create an intent containing a disbursement. If you want to check a proposed payout first, call POST /processing/api/v1/disbursements/check with the recipient details required by that payment method. For a card check, supply card details.
For a supported saved-card payout, bind the payee's card using POST /processing/api/v1/payment-instruments. When you create the payout, send the returned pi_ token with the same payment method and payee.merchantPayeeReference used for binding.
The optional check returns isDisbursementAllowed. For example, a business refusal can return HTTP 200 with these fields in the response:
{"isDisbursementAllowed": false, "errorCode": "CODE_CP0002"}For the payout creation request, use POST /processing/api/v1/intents. Inspect both disbursements and disbursementCreationErrors, including on HTTP 200. For example, a payout that exceeds its limit can produce this response excerpt:
{
"intentId": "10201",
"disbursements": [],
"disbursementCreationErrors": [{"createStatusCode": "CODE_CT0005"}]
}sequenceDiagram
participant M as Merchant
participant A as Carusell API
M->>A: POST /processing/api/v1/intents with disbursements
A-->>M: Created payouts and any creation errors
opt A payout was created
M->>A: GET /processing/api/v1/disbursements/{id}
A-->>M: Current payout details
endUse the created disbursement ID for GET disbursement. The current status can be ACCEPTED, DISBURSEMENT_REQUESTED, PAID_OUT, DECLINED or ERROR. A payout can move directly from ACCEPTED to ERROR. An unknown disbursement ID returns HTTP 404.
Updated 1 day ago
