Skip to main content
GET
/
v1
/
payments
/
{id}
GetPayment
curl --request GET \
  --url https://api.toffeepay.com/v1/payments/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "session_id": "<string>",
  "status": "processing",
  "amount": 123,
  "currency": "USD",
  "method": "card",
  "details": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "authorized_at": "2023-11-07T05:31:56Z",
  "cancelled_at": "2023-11-07T05:31:56Z",
  "succeeded_at": "2023-11-07T05:31:56Z",
  "failed_at": "2023-11-07T05:31:56Z",
  "refunded_at": "2023-11-07T05:31:56Z",
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "extra_data": {
    "real_amount": 1,
    "bonus_amount": 1
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Query Parameters

with_extra_data
boolean

Response

200 - application/json

Success

id
string
required
session_id
string
required
status
enum<string>
required
Available options:
processing,
authorized,
cancelled,
succeeded,
failed,
refunded
amount
integer<int32>
required
currency
enum<string>
required
Available options:
USD,
GBP,
EUR
method
enum<string>
required
Available options:
card,
tokenized_card,
apple_pay,
google_pay,
paypal,
paylater,
venmo,
toffee_wallet
details
string
required
created_at
string<date-time>
required
authorized_at
string<date-time> | null
cancelled_at
string<date-time> | null
succeeded_at
string<date-time> | null
failed_at
string<date-time> | null
refunded_at
string<date-time> | null
error
Error · object

Error handling

extra_data
PaymentExtraData · object