cURL
curl --request GET \ --url https://garu.com.br/api/checkout/sessions/{id} \ --header 'Authorization: Bearer <token>'
{ "id": "<string>", "status": "<string>", "url": "<string>", "product_id": 123, "price_id": "<string>", "customer_email": "<string>", "customer_name": "<string>", "metadata": {}, "success_url": "<string>", "cancel_url": "<string>", "client_reference_id": "<string>", "affiliate_id": 123, "transaction_id": 123, "expires_at": "<string>", "completed_at": "<string>", "created_at": "<string>" }
Consulte os detalhes de uma checkout session específica
cs_ABC123xyz
curl -X GET "https://api.garu.com.br/api/checkout/sessions/cs_ABC123xyz" \ -H "Authorization: Bearer sk_test_sua_chave_api"
open
complete
expired
status
{ "data": { "id": "cs_ABC123xyz", "status": "complete", "url": "https://pay.garu.com.br/pay/session/abc123...", "product_id": 123, "price_id": null, "customer_email": "joao@email.com", "customer_name": "João Silva", "metadata": { "order_id": "12345" }, "success_url": "https://seusite.com/sucesso?session_id={SESSION_ID}", "cancel_url": "https://seusite.com/cancelado", "client_reference_id": "order_abc123", "affiliate_id": null, "transaction_id": 789, "expires_at": "2025-01-20T12:00:00.000Z", "completed_at": "2025-01-19T14:30:00.000Z", "created_at": "2025-01-19T12:00:00.000Z" } }
401 - Não autorizado
{ "statusCode": 401, "message": "Unauthorized" }
Authorization
404 - Session não encontrada
{ "statusCode": 404, "message": "Checkout session not found" }
Was this page helpful?