Skip to main content
GET
/
v1
/
payment_sessions
/
{id}
Retrieve a payment session
curl --request GET \
  --url https://api.yorlet.com/v1/payment_sessions/{id} \
  --header 'Authorization: <api-key>'
{
  "id": "<string>",
  "created": 123,
  "object": "payment_session",
  "amount": 123,
  "currency": "<string>",
  "customer": "<string>",
  "description": "<string>",
  "mode": "payment",
  "payment_method_types": [
    "<string>"
  ],
  "reporting_type": "<string>",
  "return_url": "<string>",
  "transaction": "<string>",
  "url": "<string>",
  "account": "<string>",
  "deleted": false,
  "merchant": {
    "business_name": "<string>",
    "color": "<string>",
    "country": "<string>",
    "display_name": "<string>",
    "icon": "<string>",
    "id": "<string>",
    "support_email": "<string>",
    "support_phone": "<string>",
    "support_website": "<string>"
  },
  "metadata": {}
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Path Parameters

id
string
required

The id identifier.

Response

200 - application/json

Returns a payment session object if a valid identifier was provided.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
payment_session
amount
number
required

The amount of the payment session, in the smallest currency unit.

currency
string
required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

customer
required

The customer the payment session is for.

description
string | null
required

An arbitrary string attached to the object. Often useful for displaying to users.

mode
enum<string>
required

The mode of the payment session.

Available options:
payment
payment_method_types
string[]
required

The payment method types allowed for this session.

reporting_type
string | null
required

The reporting type used to categorize this payment session.

return_url
string | null
required

The URL to redirect to after the payment session is complete.

status
enum<string>
required

The status of the payment session.

Available options:
paid,
unpaid,
canceled
transaction
required

The transaction created for this payment session.

url
string | null
required

The hosted URL of the payment session.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

merchant
object

Information about the merchant operating the payment session.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.