/sessions/{id}

Reads a session with its status, gateway, customer and metadata. The same shape arrives in the session.* webhooks.

Server URLhttps://pay.contagorda.com/api/v1
GET/sessions/{id}

Authorization

Bearer token: an app key from Apps (sk_app_live_… or sk_app_test_…), or the tenant key from Settings (sk_live_… or sk_test_…). The key picks the mode: a live key only sees live data, a test key only sandbox data.

Parameters

idstring · pathrequired

The resource id.

Response Body

200The session.
idstringoptional
Format uuid
statusstringoptional

pending: created; processing: at the gateway's checkout; paid; failed: declined; expired: abandoned; refunded.

One of pending, processing, paid, failed, expired, refunded
amountstringoptional

Decimal with a dot, as a string.

refunded_amountstringoptional

What the gateway refunded so far, up to amount. Equal to amount on a full refund; smaller after a partial one. Every refund sends session.refunded again with the new total.

currencystringoptional
methodstringoptional
One of card, pix, boleto
connection_testbooleanoptional

true for the dashboard's gateway test payments.

subscription_idstring | nulloptional

The subscription this cycle belongs to.

Format uuid
gatewayobjectoptional

The configuration that handles the payment.

idstringoptional
Format uuid
namestringoptional
providerstringoptional
One of stripe, asaas, abacatepay, pagarme, cielo
sandboxbooleanoptional
metadataobjectoptional

What the product sent to /connect, echoed back. A subscription's renewal cycles carry the checkout's metadata too, plus description and billing_reason.

customerobject | nulloptional
idstringoptional
Format uuid
external_refstringoptional

Your own id for the customer, as sent to /connect.

emailstring | nulloptional
namestring | nulloptional
documentstring | nulloptional
phonestring | nulloptional
address_line1string | nulloptional
address_line2string | nulloptional
address_numberstring | nulloptional
neighborhoodstring | nulloptional
citystring | nulloptional
statestring | nulloptional
zipcodestring | nulloptional
countrystring | nulloptional
disputeobject | nulloptional

The chargeback the customer's bank opened on this payment, or null. It is answered in the gateway's dashboard; the app hears session.disputed when it opens and session.dispute_closed when the bank decides.

idstringoptional

The dispute's id at the gateway.

statusstringoptional

The gateway's status: needs_response or under_review while open; won or lost once closed.

reasonstring | nulloptional

Why the customer disputed, as the gateway reports it.

amountstringoptional

The amount held by the bank, decimal with a dot.

due_bystring | nulloptional

The last day to send evidence to the gateway.

Format date-time
opened_atstringoptional
Format date-time
closed_atstring | nulloptional

When the bank decided; null while open.

Format date-time
return_tostringoptional
Format uri
expires_atstring | nulloptional
Format date-time
created_atstringoptional
Format date-time
updated_atstringoptional
Format date-time
401Missing or invalid secret key.
errorstringoptional

What went wrong.

404No such resource for this tenant.
errorstringoptional

What went wrong.

Are you sure?

Keyboard shortcuts

⌘ KSearch and navigate⌘ JOpen and close the Workbenchg hHomeg pPaymentsg cCustomersg sSubscriptionsg aAppsg gGateways?This listEscClose