Skip to main content
GET
/
v1
/
payments
/
{id}
Get Payment
curl --request GET \
  --url https://api.spairehq.com/v1/payments/{id} \
  --header 'Authorization: Bearer <token>'
{
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "amount": 123,
  "currency": "<string>",
  "method": "<string>",
  "decline_reason": "insufficient_funds",
  "decline_message": "Your card has insufficient funds.",
  "organization_id": "<string>",
  "checkout_id": "e4b478fa-cd25-4253-9f1f-8a41e6370ede",
  "order_id": "e4b478fa-cd25-4253-9f1f-8a41e6370ede",
  "method_metadata": {
    "brand": "<string>",
    "last4": "<string>"
  },
  "processor_metadata": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.spairehq.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

You can generate a Personal Access Token from your settings.

Path Parameters

id
string<uuid4>
required

The payment ID.

Response

Successful Response

Schema of a payment with a card payment method.

created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

id
string<uuid4>
required

The ID of the object.

processor
enum<string>
required

The payment processor.

Available options:
stripe
Example:

"stripe"

status
enum<string>
required

The payment status.

Available options:
pending,
succeeded,
failed
Example:

"succeeded"

amount
integer
required

The payment amount in cents.

Example:

1000

currency
string
required

The payment currency. Currently, only usd is supported.

Example:

"usd"

method
string
required

The payment method used.

Allowed value: "card"
Example:

"card"

decline_reason
string | null
required

Error code, if the payment was declined.

Example:

"insufficient_funds"

decline_message
string | null
required

Human-reasable error message, if the payment was declined.

Example:

"Your card has insufficient funds."

organization_id
string<uuid4>
required

The ID of the organization that owns the payment.

Example:

"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

checkout_id
string<uuid4> | null
required

The ID of the checkout session associated with this payment.

Example:

"e4b478fa-cd25-4253-9f1f-8a41e6370ede"

order_id
string<uuid4> | null
required

The ID of the order associated with this payment.

Example:

"e4b478fa-cd25-4253-9f1f-8a41e6370ede"

method_metadata
CardPaymentMetadata · object
required

Additional metadata for the card payment method.

processor_metadata
Processor Metadata · object

Additional metadata from the payment processor for internal use.