CFX Pay
  1. Hardcode integration
CFX Pay
  • Introduction
  • Integration Types
  • API Standards
  • Status Flow
  • Lists
  • SPEI Mexico
  • PIX Brazil
  • Basic Integration
    • checkout_create
      POST
  • Intermediary Integration
    • checkout_form
      POST
  • Hardcode integration
    • balance_merchant
      GET
    • payment_type
      GET
    • payin_create
      POST
    • payin_check
      GET
    • payout_create
      POST
    • payout_check
      GET
  • Notification
    • How it works
  1. Hardcode integration

payout_create

POST
https://api.cfxpay.io/{{param_environment}}/{{param_company}}/gateway/payout_create
Last modified:2024-05-10 15:30:17

Observation#

Considering the request bellow its a PIX Payout Provider 01, payment_type_id= da29df38dd248d066b7656473a6da4f8
Mandatory fields are: first_name;last_name;document_type;document_number;email;account_pix_key

Request

Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Header Params
Language
string 
required
Language list
Example:
PORTUGUESE_BR
Body Params application/json
payment_type_id
string <md5>
required
This ID is returned in the endpoint payment_type.
>= 32 characters<= 32 characters
Example:
da29df38dd248d066b7656473a6da4f8
Match pattern:
^[a-fA-F0-9]{32}$
tracking_id
string <uuid>
required
External tracking reference for the transaction UUID_v4.
>= 36 characters<= 36 characters
amount
string 
required
Amount of the invoice.
The decimal separator used is a "dot" "."
<= 10 characters
Examples:
20.0015.78100.20
Match pattern:
^\d+(\.\d{2})?$
description
string 
optional
A short description.
<= 100 characters
Example:
Payout user: 1234567890
callback_url
string <uri>
required
The URL that receive notifications when a transaction is created or change STATUS.
<= 1000 characters
Example:
https://api.cfxpay.io/webhook_test
customer
object 
required
Check in payment_type for mandatory fields
first_name
string 
optional
Required if in payment_type mandatory.
Customer first name.
<= 30 characters
Example:
Satoshi
Match pattern:
^[a-zA-Z\s]+$
last_name
string 
optional
Required if in payment_type mandatory.
Customer last name.
<= 30 characters
Example:
Nakamoto
Match pattern:
^[a-zA-Z\s]+$
document_type
string 
optional
Required if in payment_type mandatory.
Customer document type.
Check the document type allowed.
<= 20 characters
document_number
string 
optional
Required if in payment_type mandatory.
Customer document number.
<= 20 characters
Match pattern:
^[a-zA-Z0-9]+$
email
string <email>
optional
Required if in payment_type mandatory.
Customer email.
<= 60 characters
Example:
support@cfxpay.io
phone
string 
optional
Required if in payment_type mandatory.
Customer phone number.
<= 16 characters
Match pattern:
^\+?[0-9]{1,15}$
gender
string 
optional
Required if in payment_type mandatory.
Customer gender.
<= 20 characters
Match pattern:
^[a-zA-Z]+$
address
string 
optional
Required if in payment_type mandatory.
Customer address.
<= 150 characters
Match pattern:
^[a-zA-Z0-9\s\.+:,\-_]+$
city
string 
optional
Required if in payment_type mandatory.
Customer city.
<= 60 characters
Match pattern:
^[a-zA-Z\s]+$
country
enum<string> 
optional
Required if in payment_type mandatory.
Customer country.
>= 2 characters<= 2 characters
Allowed values:
ARBRCLCOCRECSVMXPAPEGT
zip
string 
optional
Required if in payment_type mandatory.
Customer zip code.
<= 10 characters
Match pattern:
^[a-zA-Z0-9\-]+$
account_type
string 
optional
Required if in payment_type mandatory.
Customer account type.
Account type list.
<= 8 characters
Match pattern:
^[a-zA-Z]+$
account_channel
enum<string> 
optional
Required if in payment_type mandatory.
Customer account channel.
Allowed values:
CASHONLINE
account_agency_number
string 
optional
Required if in payment_type mandatory.
Customer account agency number.
This information will be provided from the bank, it specifies the Agency number within the bank.
<= 6 characters
Match pattern:
^[a-zA-Z0-9]+$
account_number
string 
optional
Required if in payment_type mandatory.
Customer account number.
<= 25 characters
Match pattern:
^[0-9]+$
account_type_code
string 
optional
Required if in payment_type mandatory.
Customer account type code.
Account type code list.
>= 4 characters<= 4 characters
Match pattern:
^[0-9]+$
account_pix_key
string 
optional
Required if in payment_type mandatory.
Customer account pix key.
<= 100 characters
account_bank_code
string 
optional
Required if in payment_type mandatory.
Customer account bank code.
<= 5 characters
account_bank_name
string 
optional
Required if in payment_type mandatory.
Customer account bank name.
The code that identified the bank used by the customer.
<= 5 characters
account_aba_swift
string 
optional
Required if in payment_type mandatory.
Customer account aba swift.
<= 50 characters
Match pattern:
^[a-zA-Z0-9]+$
device_id
string 
optional
Required if in payment_type mandatory.
Customer device id.
<= 50 characters
ip
string <ip>
optional
Required if in payment_type mandatory.
Customer IPv4 or IPv6 address.
>= 7 characters<= 39 characters
Example
{
    "payment_type_id": "da29df38dd248d066b7656473a6da4f8",
    "amount": "10.00",
    "description": "Payout PIX Provider 01",
    "tracking_id": "55616f79-0bdd-42f2-8943-168ae7659001",
    "callback_url": "https://api.cfxpay.io/webhook_test",
    "customer": {
		"first_name": "Satoshi",
		"last_name": "Nakamoto",
		"document_type": "CPF",
		"document_number": "28276469686",
		"email": "dev@cfxpay.io",
		"phone": "",
		"gender": "",
		"address": "",
		"city": "",
		"country": "",
		"zip": "",
		"account_type": "",
		"account_channel": "",
		"account_agency_number": "",
		"account_number": "",
		"account_type_code": "",
		"account_pix_key": "28276469687",
		"account_bank_name": "",
		"account_aba_swift": ""
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.cfxpay.io/{{param_environment}}/{{param_company}}/gateway/payout_create' \
--header 'Language: PORTUGUESE_BR' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
    "payment_type_id": "da29df38dd248d066b7656473a6da4f8",
    "amount": "10.00",
    "description": "Payout PIX Provider 01",
    "tracking_id": "55616f79-0bdd-42f2-8943-168ae7659001",
    "callback_url": "https://api.cfxpay.io/webhook_test",
    "customer": {
		"first_name": "Satoshi",
		"last_name": "Nakamoto",
		"document_type": "CPF",
		"document_number": "28276469686",
		"email": "dev@cfxpay.io",
		"phone": "",
		"gender": "",
		"address": "",
		"city": "",
		"country": "",
		"zip": "",
		"account_type": "",
		"account_channel": "",
		"account_agency_number": "",
		"account_number": "",
		"account_type_code": "",
		"account_pix_key": "28276469687",
		"account_bank_name": "",
		"account_aba_swift": ""
    }
}'

Responses

🟢200Success
application/json
Body
server
string 
required
code
integer 
required
message
string 
required
identifier
string 
required
type
string 
required
caller
string 
required
caller_id
string 
required
translation_message
string 
required
gateway
array [object {20}] 
optional
transaction_id
string 
required
merchant_id
string 
required
tracking_id
string 
required
api_transaction_id
string 
required
payment_type_id
string 
required
callback_url
string 
required
country
string 
required
source
string 
required
origin
string 
required
status
string 
required
currency_symbol
string 
required
amount
string 
required
amount_fee
string 
optional
amount_final
string 
required
exchange_symbol
string 
optional
exchange_rate
string 
optional
exchange_amount
string 
optional
exchange_amount_fee
string 
optional
exchange_amount_final
string 
optional
customer
object (Customer Payout) 
optional
Example
{
    "server": "01",
    "code": 0,
    "message": "Success",
    "identifier": "1709225791610559534",
    "type": "LOG_INFO",
    "caller": "_gateway_payout_create",
    "caller_id": "1709225790582835855",
    "translation_message": "Sucesso",
    "gateway": [
        {
            "transaction_id": "1709225790684624139",
            "merchant_id": "cfxpaygateway_merchant",
            "tracking_id": "55616f79-0bdd-42f2-8943-168ae7659001",
            "api_transaction_id": "6622708",
            "payment_type_id": "da29df38dd248d066b7656473a6da4f8",
            "callback_url": "https://api.cfxpay.io/webhook_test",
            "country": "BR",
            "source": "WITHDRAW",
            "origin": "PROVIDER_01",
            "status": "PENDING",
            "currency_symbol": "BRL",
            "amount": "10.00",
            "amount_fee": "0.00",
            "amount_final": "10.00",
            "customer": {
                "first_name": "Satoshi",
                "last_name": "Nakamoto",
                "document_type": "1",
                "document_number": "28276469686",
                "email": "dev@cfxpay.io",
                "country": "BR",
                "account_agency_number": "-",
                "account_number": "-",
                "account_type_code": "-",
                "account_pix_key": "28276469687",
                "account_bank_code": "-"
            }
        }
    ]
}
🟠400Bad Request
Modified at 2024-05-10 15:30:17
Previous
payin_check
Next
payout_check
Built with