Integration GuideAPI Reference
Integration Guide

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.

ActionMethod and pathJSON request body
Sign inPOST /configuration-management/api/v1/admin-accounts/oauth/authorize{"login":"[email protected]","password":"<password>"}
RefreshPOST /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.

Operationssettlement-account-id
POST /intents, PATCH /payments/{id}, POST /refunds, GET /refunds/{id}, POST /disbursements/check, POST /payment-instrumentsRequired
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 details

For 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 stagestatus for new payments
In progressACCEPTED, AUTHORIZATION_REQUESTED, AUTHORIZED, CAPTURE_REQUESTED, CANCELLATION_REQUESTED
OutcomeCAPTURED, CANCELLED, DECLINED, EXPIRED, ERROR

Did this page help you?