Easy Cashout Creation Endpoint

Learn how to create cashout requests with our Easy Cashout API

Easy Cashout Creation Endpoint

POST https://payout-api-stg.directa24.com/v1/request

This endpoint is used to create cashout links hosted by Directa24

Request Body

NameTypeDescription

login

string

Your Directa24 Cashout login

password

string

Your Directa24 Cashout Pass

external_id

string

ID on your end used to identify the cashout

country

string

Country of the cashout

currency

string

Currency of the amount

amount

number

Amount of the cashout

document_id

string

Personal document ID of the beneficiary

first_name

string

Beneficiary's first name

last_name

string

Beneficiary's last name

on_hold

boolean

Used to mark the cashout on hold once created

notification_url

string

URL where the notifications will be sent to

{
    "data": {
        "cashout_url": "https://payout.directa24.com/payout/64e5202599a843b0a73bcae43407a88a",
        "external_id": "45343242333",
        "status": "CREATED"
    }
}

Easy Cashout Request

Request Example

The request has to be made through a POST request to the above URL. The body of the request is sent in JSON Format. Please remember to whitelist the IP of your servers under the "Cashout credentials" section of our Merchant Panel by going to Settings -> API Access.

// URL
POST: https://payout-api-stg.directa24.com/v1/request

// JSON Body
{
	"login": "xxxxxx", 
	"password": "xxxxxxx", 
	"external_id": "45343242", 
	"country": "BR", 
	"currency": "USD", 
	"amount": 250, 
	"document_id": "8854521458", 
	"first_name": "Jonh", 
	"last_name": "Smith",
	"on_hold": false,
	"notification_url": "https://webhook.site/url"
}

Response: Success

Response Example

{
    "data": {
        "cashout_url": "https://payout.directa24.com/payout/2bafcb316edf488897f60d59d59c00d0",
        "external_id": "45343242",
        "status": "CREATED"
    }
}

Response Fields

Field nameFormatDescription

data

object[]

Object containing the elements of the response

data.cashout_url

String (URL)

Field containing the link of the cashout generated. Store this value to send it to your customer

data.external_id

String

External ID of the transaction. It is the same you sent

data.status

String

Status of the transaction: CREATED

Response: Error

Response Example

// Missing fields
{
    "error": "missing_fields",
    "message": "The following fields are missing or invalid: document_id"
}

// Invalid request
{
    "error": "invalid_request",
    "message": "One or more parameters provided are invalid"
}

// Invalid IP Address
{
    "error": "invalid_ip_address",
    "message": "Invalid IP address"
}

// Invalid credentials
{
    "error": "invalid_credentials",
    "message": "The provided credentials are invalid"
}

Response Fields

Field nameFormatDescription

error

String

Field containing the error type

message

String

Field containing the description of the error

Request Fields Description

FieldFormatMandatoryDescription

login

String

Yes

Your Directa24 CASHOUTS API Key, found on the Merchant Panel: Settings -> API Access. Notice there're specific Cashout credentials

password

String

Yes

Your Directa24 CASHOUTS API Passphrase, found on the Merchant Panel: Settings -> API Access. Notice there're specific Cashout credentials

external_id

String

Yes

External ID generated by you used to identify the cashout

country

String

Yes

Cashout country code in ISO format. Click here to see country codes.

currency

String (length: 3)

Yes

Currency in which the amount was specified. Click here to see the currencies available per country.

amount

Number

Yes

Cashout Amount in the currency specified in the currency field. Make sure the amount doesn't have quotes as it is of type number.

document_id

String

Yes

Customer's document number, it won't be possible to change it later. Check document validations here.

first_name

String

No

Customer's first name, it won't be possible to change it later

last_name

String

No

Users last name, it won't be possible to change it later

on_hold

boolean

No

Indicates if the cashout will be put on old after the creation. Make sure the on_hold value doesn't have quotes as it is of type boolean.

notification_url

String

No

Merchant URL to be notified about status changes

Creation HTTP Codes

CodeDescription

200

The external ID was already used, so the data for the previous cashout is returned

201

The cashout was successfully created and the URL is returned

400

Invalid request, usually due to missing parameters

401

Invalid credentials were provided or the source

5XX

Something went wrong on Directa24’s end. Contact integration@directa24.com

Last updated