Skip to main content
GET
/
s2s
/
payments
/
{payment_id}
cURL
curl --request GET \
  --url https://api.xpaycheckout.com/s2s/payments/{payment_id} \
  --header 'Authorization: Basic <encoded-value>'
{
  "payment_id": "pay_8Ks3Jq1tZxPjYVhRQW2r5",
  "status": "SUCCESS",
  "amount": 10000,
  "currency": "USD",
  "customer_id": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
  "receiptId": "receipt_abc123",
  "channel": "web",
  "payment_method": "CARD",
  "transaction_id": "txn_9Ls4Kp2uAxQkZWiSRX3s6",
  "forward_url": "",
  "card_token": "tok_4xK2Nm1tYwOiXUgPQV1r2",
  "processed_at": 1728128160000,
  "created_at": 1728128100000
}
Retrieves payment details by payment ID.
Polling is not allowed. Use webhooks to receive payment status updates instead of repeatedly calling this endpoint.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

payment_id
string
required

Unique payment identifier

Response

Payment details retrieved successfully

payment_id
string
Example:

"pay_8Ks3Jq1tZxPjYVhRQW2r5"

status
enum<string>
Available options:
SUCCESS,
FAILED,
PENDING,
CANCELLED,
PARTIALLY_REFUNDED,
REFUNDED
Example:

"SUCCESS"

amount
integer
Example:

10000

currency
string
Example:

"USD"

customer_id
string
Example:

"cus_Tfd3Jq1tZxPjYVhRQW2r3"

receiptId
string
Example:

"receipt_abc123"

channel
string
Example:

"web"

payment_method
string
Example:

"CARD"

transaction_id
string

Transaction ID (returned for successful card payments)

Example:

"txn_9Ls4Kp2uAxQkZWiSRX3s6"

forward_url
string

Forward URL for redirecting user (returned for non-card payment methods like Apple Pay, Klarna, etc.)

Example:

""

card_token
string

Card token if card was saved (returned for card payments)

Example:

"tok_4xK2Nm1tYwOiXUgPQV1r2"

processed_at
integer

Epoch timestamp in milliseconds of when payment was processed

Example:

1728128160000

created_at
integer

Epoch timestamp in milliseconds of when payment was created

Example:

1728128100000