GG CheckoutCentral de Ajuda
Ferramentas avançadasAPI de pagamentos

Referência da API

As cinco rotas da API de pagamentos do ggCheckout: criar, consultar, listar e cancelar cobranças Pix e listar as ordens de cobrança da chave.

Todas as rotas da API, geradas da especificação OpenAPI publicada em api.ggcheckout.app/openapi.json. Esta página acompanha a API sozinha: quando uma rota muda, a referência muda junto.

GET/v1/payment_intents

Only the intents of the key's mode (live or test) and wallets.

AuthorizationBearer <token>

ggpk_live_… or ggpk_test_…

In: header

Query Parameters

limit?integer

Page size, 1 to 100 (default 20).

Formatint64
starting_after?string

The next_cursor of the previous page.

status?string

Only intents in this status.

Value in

  • "processing"
  • "requires_action"
  • "succeeded"
  • "expired"
  • "canceled"
  • "failed"
external_reference?string
created_gte?integer

Only intents created at or after this Unix timestamp (seconds).

Formatint64

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/payment_intents"
{  "data": [    {      "amount": 0,      "buyer": {        "document": "string",        "email": "string",        "name": "string",        "phone": "string"      },      "canceled_at": "string",      "created_at": "string",      "description": "string",      "expires_at": "string",      "external_reference": "string",      "id": "string",      "livemode": true,      "metadata": {        "property1": "string",        "property2": "string"      },      "object": "string",      "pix": null,      "status": "processing",      "succeeded_at": "string",      "wallet": "string"    }  ],  "has_more": true,  "next_cursor": "string",  "object": "string"}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
POST/v1/payment_intents

Charges the wallet with a PIX. With a ggpk_test_ key the PIX is simulated and nothing reaches a gateway. Requires an Idempotency-Key header.

AuthorizationBearer <token>

ggpk_live_… or ggpk_test_…

In: header

Header Parameters

Idempotency-Key*string

1 to 255 printable ASCII characters; replayable for 24 hours.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/payment_intents" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "amount": 0,    "buyer": {      "document": "string",      "email": "string",      "name": "string",      "phone": "string"    },    "wallet": "string"  }'
{  "amount": 0,  "buyer": {    "document": "string",    "email": "string",    "name": "string",    "phone": "string"  },  "canceled_at": "string",  "created_at": "string",  "description": "string",  "expires_at": "string",  "external_reference": "string",  "id": "string",  "livemode": true,  "metadata": {    "property1": "string",    "property2": "string"  },  "object": "string",  "pix": null,  "status": "processing",  "succeeded_at": "string",  "wallet": "string"}
{  "amount": 0,  "buyer": {    "document": "string",    "email": "string",    "name": "string",    "phone": "string"  },  "canceled_at": "string",  "created_at": "string",  "description": "string",  "expires_at": "string",  "external_reference": "string",  "id": "string",  "livemode": true,  "metadata": {    "property1": "string",    "property2": "string"  },  "object": "string",  "pix": null,  "status": "processing",  "succeeded_at": "string",  "wallet": "string"}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
GET/v1/payment_intents/{id}
AuthorizationBearer <token>

ggpk_live_… or ggpk_test_…

In: header

Path Parameters

id*string

The pi_… id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/payment_intents/string"
{  "amount": 0,  "buyer": {    "document": "string",    "email": "string",    "name": "string",    "phone": "string"  },  "canceled_at": "string",  "created_at": "string",  "description": "string",  "expires_at": "string",  "external_reference": "string",  "id": "string",  "livemode": true,  "metadata": {    "property1": "string",    "property2": "string"  },  "object": "string",  "pix": null,  "status": "processing",  "succeeded_at": "string",  "wallet": "string"}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
POST/v1/payment_intents/{id}/cancel

Allowed before the intent succeeds, fails or expires. Canceling a canceled intent is a no-op. A PIX paid after the cancel still succeeds and emits payment_intent.succeeded_after_cancel.

AuthorizationBearer <token>

ggpk_live_… or ggpk_test_…

In: header

Path Parameters

id*string

The pi_… id.

Header Parameters

Idempotency-Key?|

Optional: cancel is idempotent by itself.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/payment_intents/string/cancel"
{  "amount": 0,  "buyer": {    "document": "string",    "email": "string",    "name": "string",    "phone": "string"  },  "canceled_at": "string",  "created_at": "string",  "description": "string",  "expires_at": "string",  "external_reference": "string",  "id": "string",  "livemode": true,  "metadata": {    "property1": "string",    "property2": "string"  },  "object": "string",  "pix": null,  "status": "processing",  "succeeded_at": "string",  "wallet": "string"}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
GET/v1/wallets
AuthorizationBearer <token>

ggpk_live_… or ggpk_test_…

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/wallets"
{  "data": [    {      "active_pix_count": 0,      "id": "string",      "name": "string",      "object": "string"    }  ],  "object": "string"}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}
{  "error": {    "code": "string",    "message": "string",    "param": "string",    "request_id": "string",    "type": "authentication"  }}