Skip to main content
POST
/
v1
/
card
Criar cobrança no cartão
curl --request POST \
  --url https://api.ephra.io/v1/card \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amountInCents": 10000,
  "card": {
    "cardToken": "tok_abc123...",
    "installments": 1,
    "holderName": "MARIA SILVA"
  },
  "customer": {
    "documentType": "cpf",
    "document": "12345678909",
    "name": "Maria Silva",
    "email": "maria@email.com",
    "phone": "+5511999998888",
    "billingAddress": {
      "street": "<string>",
      "number": "<string>",
      "neighborhood": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zipCode": "<string>"
    }
  },
  "description": "Pedido #1234",
  "postbackUrl": "<string>",
  "items": [
    {
      "title": "Produto A",
      "tangible": false,
      "quantity": 1,
      "amountInCents": 10000,
      "shippingAddress": {
        "street": "<string>",
        "number": "<string>",
        "neighborhood": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zipCode": "<string>"
      }
    }
  ]
}
'
{
  "success": true,
  "message": "Transação aprovada",
  "data": {
    "id": "clxabc123def456",
    "card": {
      "token": "tok_abc123...",
      "brand": "MASTERCARD",
      "last4": "1111"
    },
    "status": "paid",
    "fees": 175
  }
}
Cria uma cobrança no cartão de crédito usando um cardToken (obtido em Tokenizar cartão). Em até 12 parcelas. Diferente do PIX, o cartão pode resolver na hora: a resposta vem com status paid, refused ou pending (quando o adquirente confirma de forma assíncrona). Quando recusado, o refuseReason explica o motivo.
Visão conceitual (segurança, parcelas, recusas) em Guias › Pagamentos no cartão.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
amountInCents
integer
required
Example:

10000

card
object
required
customer
object
required
description
string
Example:

"Pedido #1234"

postbackUrl
string<uri>
seller
object
items
object[]

Response

Cobrança processada

success
boolean
Example:

true

message
string
Example:

"Transação aprovada"

data
object