Our API Docs just got a new look!

Create deposit

Create a deposit request

post

Create a deposit request collecting and sending the information needed. We will return you with the information required to create the checkout on your own website or redirect the user to the checkout page .

Header parameters
Content-TypestringRequired

Media type of the body sent to the API.

Default: application/json
X-Datestring · date-timeRequired

ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ)

X-LoginstringRequired

Merchant X-Login API Key.

Example: your-merchant-x-login-key
AuthorizationstringRequired

Authorization control hash.

Example: HMAC-SHA256 a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f61234
X-Idempotency-KeystringOptional

Unique idempotency key for ensuring that the same request is not processed more than once.

Body
countrystringRequired

Country of the deposit.

amountnumber · doubleRequired

Amount of the deposit.

invoice_idstringRequired

Unique deposit ID on your side.

currencystringRequired

Currency of the deposit.

payment_methodstringRequired

Payment method code. Codes can be obtained from payment methods endpoint, or our coverage page

token_requestedstringOptional

Used to define if merchant want to receive the checkout_token in response in order to display Fragments SDK all-in-one.

card_identifierstringOptional

Used to generate a transaction in the payer's card stored in our vault.

allow_installmentsbooleanOptional

Used to indicate if the deposit should allow installments (in a credit card transaction). The options will be displayed to the user.

sub_merchant_idinteger · int64Optional

Used to specify for which SubMerchant ID the deposit will be created.

back_urlstring · urlOptional

HTTPS URL used to redirect the customer in case of cancelling the deposit.

success_urlstring · urlOptional

HTTPS URL used to redirect the customer in case of success.

error_urlstring · urlOptional

HTTPS URL used to redirect the customer in case of error while generating the payment.

notification_urlstring · urlOptional

HTTPS URL used to send the notifications about deposit's change of status.

payment_typesstring[]Optional
request_payer_data_on_validation_failurebooleanOptional

Flag specifying if you want to ignore errors because of invalid phone, zip_code and/or city's state.

bonus_amountnumber · doubleOptional

Used to show the customer a bonus amount (Pay 100, receive 120).

bonus_relativebooleanOptional

Used to define if the bonus_amount was specified as an absolute value or as a percentage.

strikethrough_pricenumber · doubleOptional

Used to show the customer a strikethrough amount.

descriptionstringOptional

Description of the deposit.

client_ipstring · ipOptional

Valid IPv4/6 Address of the customer.

device_idstringOptional

Unique customer's device ID created using our JS library.

languagestringOptional

Language of the view page.

logostring · urlOptional

HTTPS URL used as the Merchant logo on our cashier page.

testbooleanOptional

Used to mark a deposit as test. If true, the deposit will not affect the merchant's balance.

mobilebooleanOptional

Used to specify if the redirection will be made on a mobile device.

expirationnumberOptional

Used to express, in minutes, how long after its creation the deposit should expire. Cannot be more than the default expiration of the payment method.

early_releasebooleanOptional

Used to specify if the deposit should be released earlier.

fee_on_payerbooleanOptional

Used to specify if you want to let the customer assume the deposit fee.

Responses
201

Deposit successfully initiated. The response structure varies based on the checkout type (e.g., HOSTED or ONE_SHOT).

application/json
Responseone of
or
post
POST /v3/deposits HTTP/1.1
Host: api-stg.directa24.com
Content-Type: application/json
X-Date: 2025-08-29T14:15:23.818Z
X-Login: text
Authorization: text
Accept: */*
Content-Length: 666

{
  "invoice_id": "1000000001",
  "amount": 49.99,
  "country": "BR",
  "currency": "BRL",
  "payer": {
    "id": "11",
    "document": "84932568207",
    "first_name": "Ricardo",
    "last_name": "Carlos",
    "email": "[email protected]"
  },
  "payment_method": "IX",
  "description": "test description",
  "client_ip": "123.123.123.123",
  "device_id": "00000000-00000000-01234567-89ABCDEF",
  "back_url": "https://www.merchant-site.com/deposit_cancelled",
  "success_url": "https://www.merchant-site.com/deposit_completed",
  "error_url": "https://www.merchant-site.com/deposit_error",
  "notification_url": "https://www.merchant-site.com/d24/notify",
  "logo": "https://www.merchant-site.com/d24.png",
  "test": true,
  "mobile": false,
  "language": "pt"
}
{
  "checkout_type": "ONE_SHOT",
  "redirect_url": "https://checkout-stg.directa24.com/v1/gateway/show?id_payment=56578849&signature=fff0e0a6a98066c19caf",
  "deposit_id": 300000025,
  "user_id": "11",
  "merchant_invoice_id": "1000000001",
  "payment_info\"": {
    "type": "BANK_TRANSFER",
    "payment_method": "IX",
    "payment_method_name": "Pix",
    "amount": 49.99,
    "currency": "BRL",
    "expiration_date": "2025-08-14T18:37:54Z",
    "created_at": "2025-08-14T21:37:54Z",
    "metadata": {
      "payer_document": "84932568207",
      "payer_document_type": "CPF",
      "reference": "1180994767",
      "show_terms_conditions": "false",
      "digitable_line": "00190.00009 03141.056030 01870.806179 8 83180000016564",
      "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAACMUlEQVR4Xt3UMZKsIBAGYEjkCkOCV1sTuQIkioleQRK4miRyhSahH6Uzr2qRucASflXa0Pw0wd8LyJ8CIEKwUwentKFNSGi3tLlu3haf2rB4mHqjlAw7/wI2Rsc9HvIreKeoefFz/gZozWC9Rev/7+M3AOH2vT5nqQAxMyD9TtF++lEBUMOSIZ0gapRNSOeQGYZohui+AV9fMwjphLq3XgOuetmyXHaJRjcBRtEJac+Rm942IW0Jo5tGnuW77AOMGLJMIVMzXT99AIZDdUInM2fShpQp/NC4uaG0uwlZSfRYKsu4XmWfwFYdfHTzTtT10wckGF9TJ0HJ8122BhjsVgLjSlz80oaXUorazI9J3DdXQzI0hJKEg+7vKjVgSE6R3hpp4Qske+rFrtOPttfxH5BsCuvst/1Hw132ASVTYiQMLdDUBOgz3UI49Bbyffwa0kpI+UT0dqV32RowphDdi3nM9/EfUK4y4WYk8O0O3RPW+RyFtscM7wTVkBXzaZ8YmmG5yj4A95F0E7U263zvowbQPqZVsQhjx5uQ1ZCnjsJwknFuAhpmSxzwLB26y9ZQHnqnSKcYzD62YXr1B3caBLsHyhNYeX8h2kPC9I52BdCbrowtloeD+iaUMcM39Isv2brKPqCMLScm7oHbe/Q9IKEbbPJliCYY2rDYQ0jDYgB6PY8WlAbJoz+0+XzygKU0aSzZxWvrT8BdSY/p4NHd+agByEsMRskYYrqfaQ2/19+GfwmGnDkcom5PAAAAAElFTkSuQmCC"
    }
  }
}

Error codes

For more information regarding error codes, please visit API Codes page

Last updated

Was this helpful?