Skip to main content

Create Payment

POST 

/v1/payments

Description: Endpoint that processes a payment.

Request

Header Parameters

    x-transaction-uuid stringrequired

    The transaction ID is a UUID (v4) used to uniquely identify the object that will be created. All objects must have an identifier.

    nonce stringrequired

    The nonce ID is a UUID (v4) used to uniquely identify the request. All requests must have an identifier.

    x-lang string

    Possible values: [pt-BR, en-US]

    Indicates the preferred language. Defaults to Brazilian Portuguese if unspecified.

    x-product-uuid string

    The product ID is a UUID (v4) used to identify the Z.ro product configuration.

    x-product-target-user-uuid string

    The product target user ID is a UUID (v4) used to identify what user account this request must be executed. Require: x-product-uuid.

Body

required
    payment_method stringrequired

    Possible values: [DEBIT, CREDIT]

    Payment method used.

    amount_total numberrequired

    Payment amount in cents.

    currency_tag stringrequired

    Possible values: [BRL, USD]

    Three-letter code of the payment currency.

    buyer_name stringrequired

    Buyer name.

    buyer_email stringrequired

    Buyer email address.

    buyer_phone stringrequired

    Buyer phone number.

    buyer_document stringrequired

    Buyer document.

    buyer_document_type stringrequired

    Possible values: [CPF, CNPJ]

    Buyer document type.

    installments number

    Number of installments for the payment.

    payment_card object
    card_number stringrequired

    Card number.

    card_cvv stringrequired

    Card CVV.

    card_name stringrequired

    Card holder name.

    card_expiry_date stringrequired

    Card expiry date in MM-YYYY format.

    buyer_address object
    zip_code objectrequired

    User address zip code.

    street objectrequired

    User address street.

    number objectrequired

    User address number.

    neighborhood object

    User address neighborhood.

    city objectrequired

    User address neighborhood.

    federative_unit objectrequired

    User address federative unit.

    country objectrequired

    User address country.

    complement object

    User address complement.

Responses

Payment created successfully.

Schema
    id stringrequired

    Payment ID.

    status stringrequired

    Possible values: [PENDING, AUTHORIZED, REVERTED, CANCELLED, SETTLED]

    Payment status.

    created_at date-timerequired

    Payment creation date.

    updated_at date-timerequired

    Payment update date.

Authorization: http

name: bearertype: httpscheme: bearerbearerFormat: JWT
curl -L -X POST 'https://docs.zrobank.io/v1/payments' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"payment_method": "CREDIT",
"amount_total": 10000,
"currency_tag": "BRL",
"buyer_name": "John Doe",
"buyer_email": "john.doe@zrobank.com",
"buyer_phone": "+5511999999999",
"buyer_document": "12345678901",
"buyer_document_type": "CPF",
"installments": 1,
"payment_card": {
"card_number": "1234567890123456",
"card_cvv": "123",
"card_name": "John Doe",
"card_expiry_date": "04-2025"
},
"buyer_address": {
"zip_code": "0975858",
"street": "Alameda",
"number": 10,
"neighborhood": "Alphaville",
"city": "São Paulo",
"federative_unit": "SP",
"country": "Brasil",
"complement": "flat 1201"
}
}'
Request Collapse all
Auth
Parameters
— headerrequired
— headerrequired
— header
— header
— header
Body required
{
  "payment_method": "CREDIT",
  "amount_total": 10000,
  "currency_tag": "BRL",
  "buyer_name": "John Doe",
  "buyer_email": "john.doe@zrobank.com",
  "buyer_phone": "+5511999999999",
  "buyer_document": "12345678901",
  "buyer_document_type": "CPF",
  "installments": 1,
  "payment_card": {
    "card_number": "1234567890123456",
    "card_cvv": "123",
    "card_name": "John Doe",
    "card_expiry_date": "04-2025"
  },
  "buyer_address": {
    "zip_code": "0975858",
    "street": "Alameda",
    "number": 10,
    "neighborhood": "Alphaville",
    "city": "São Paulo",
    "federative_unit": "SP",
    "country": "Brasil",
    "complement": "flat 1201"
  }
}
ResponseClear

Click the Send API Request button above and see the response here!