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.
/v1/payment_intentsOnly the intents of the key's mode (live or test) and wallets.
Authorization
bearer ggpk_live_… or ggpk_test_…
In: header
Query Parameters
Page size, 1 to 100 (default 20).
int64The next_cursor of the previous page.
Only intents in this status.
Value in
- "processing"
- "requires_action"
- "succeeded"
- "expired"
- "canceled"
- "failed"
Only intents created at or after this Unix timestamp (seconds).
int64Response 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" }}/v1/payment_intentsCharges the wallet with a PIX. With a ggpk_test_ key the PIX is simulated and nothing reaches a gateway. Requires an Idempotency-Key header.
Authorization
bearer ggpk_live_… or ggpk_test_…
In: header
Header Parameters
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" }}/v1/payment_intents/{id}Authorization
bearer ggpk_live_… or ggpk_test_…
In: header
Path Parameters
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" }}/v1/payment_intents/{id}/cancelAllowed 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.
Authorization
bearer ggpk_live_… or ggpk_test_…
In: header
Path Parameters
The pi_… id.
Header Parameters
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" }}/v1/walletsAuthorization
bearer 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" }}