Retrieve Detailed Checkout Information

The Retrieve Checkout endpoint returns the complete session record for a specific checkout, identified by its unique ID. The response includes the checkout status, payable amount, currency, associated payment link or subscription, and any transactions linked to the session. This data is essential for verifying the outcome of a payment flow and reconciling checkout activity against business records.

Use the include query parameter to load additional related data such as the associated payment link and transactions. This endpoint is ideal for verifying checkout status during the payment flow.

GET/payment/checkouts/{checkout_id}
Sandbox: https://api.payiano.dev/v1/payment/checkouts/{checkout_id}
Live: https://api.payiano.com/v1/payment/checkouts/{checkout_id}
Security
  • Authorization header with access token is required to access this endpoint: Bearer ACCESS-TOKEN
  • Your access token should be associated to this permission payment.checkouts.view
Request
Request body schema:
application/json
Path parameters:
checkout_id
required
Type: ulid
Length: 26

The unique ID assigned to each checkout which is generated by our system using the ULID format. Each ID is precisely 26 characters long, ensuring a unique and consistent identifier for every checkout. This ULID is automatically created by our system and is used to uniquely identify and track each checkout in our database.

Query parameters:
includes
Type: array_of_enums|null
Possible values:
JSON
[
"checkout.payer", "checkout.payer.billing_address", "checkout.payer.billing_address.country", "checkout.payer.shipping_address", "checkout.payer.shipping_address.country" ]

A list of additional checkout related objects to eager-load and return with the response. Pass only the relations you need to keep response payloads lean. See Including Resources for the full list of supported include values and usage details.

Response
200
Response schema:
application/json
Response body:
checkout
Type: object

The full checkout record, including billed amount, currency, payment method, lifecycle status, and creation and expiration timestamps.

id
Type: ulid
Length: 26

The unique ID assigned to each checkout which is generated by our system using the ULID format. Each ID is precisely 26 characters long, ensuring a unique and consistent identifier for every checkout. This ULID is automatically created by our system and is used to uniquely identify and track each checkout in our database.

payable_id
Type: ulid

The checkout payable model ID.

payable_type
Type: enum
Possible values:
JSON
[
"payment.payment_link" ]

The checkout payable model type.

currency_code
Type: enum
Possible values:
JSON
[
"EGP" ]

The three-character ISO-4217 Currency Code that identifies the currency for the checkout. Your business should be eligible to use the selected currency code.

paid_amount
Type: decimal

The checkout amount value that has already been paid. The length includes the value, the decimal digit and the decimal value. The API accepts 2 digits like 50.53.

total_amount
Type: decimal

The checkout total amount value that is due. The length includes the value, the decimal digit and the decimal value. The API accepts 2 digits like 50.53.

remaining_amount
Type: decimal

The checkout remaining amount to be paid. The length includes the value, the decimal digit and the decimal value. The API accepts 2 digits like 50.53.

is_completed
Type: boolean

This attribute indicates whether the checkout is completed or not.

is_coupon_allowed
Type: boolean

This attribute indicates if coupons are allowed for this checkout.

has_billing_address
Type: boolean

This attribute indicates the customer needs to provide their billing address or not.

has_shipping_address
Type: boolean

This attribute indicates the customer needs to provide their shipping address or not.

status
Type: enum
Possible values:
JSON
[
"unpaid", "pending", "cancelled", "paid", "over_paid", "fully_refunded", "partially_refunded", "initiated", "partially_paid" ]

This attribute tells that what stage the checkout is in.

error_redirect_url
Type: url|null
Max: 1000

This attribute specifies the URL to which a user is redirected to in case of a failure in the checkout's process. It is used for error handling and user experience improvement, allowing users to be informed and take appropriate actions in case of a process failure. The URL should be carefully crafted to provide useful information or alternatives to the user following a failure event.

success_redirect_url
Type: url|null
Max: 1000

Similar to error_redirect_url, this attribute defines the URL where users are redirected after a successful operation or transaction within the checkout. It's a critical part of user experience, ensuring users are guided to the correct next step or confirmation page after a successful interaction.

pay_action
Type: enum|null
Default: pay
Possible values:
JSON
[
"pay", "book", "rent", "donate", "subscribe" ]

The checkout pay action.

fee_strategy
Type: enum
Default: default
Possible values:
JSON
[
"payer", "payee", "default" ]

The checkout applied transactions processing Fees Strategy.

urls
Type: object

A collection of URLs related to the checkout.

url
Type: url

This is the full URL to the checkout page. It's a direct link that takes you to the specific page where the transaction or payment process happens. This link is typically unique and you can use it to share the checkout page with your customers.

qr_code_url
Type: url

This is the unique QR code image URL for the checkout. When user scans this QR they will be redirected to the correct checkout pay page to proceed the payment.

paid_at
Type: datetime|null

This attribute indicates when the checkout was paid. This attribute can be formatted as an ISO 8601 string or a UNIX timestamp in milliseconds, depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or 1722572118554). By default, the format is UNIX timestamp in milliseconds.

payer
Type: object|null

The payer object containing the personal contact details and address information of the customer who is submitting payment for this checkout.

name
Type: string
Min: 2
Max: 100

The payer's full legal or preferred name as it appears on billing documents and payment receipts.

email
Type: string
Min: 5
Max: 255

The payer's email address used for transactional receipts, payment confirmations, and support communications.

phone_number
Type: string

The payer's mobile phone number used for SMS notifications, direct contact, and two-factor verification.

shipping_address_as_billing_address
Type: boolean

Indicates whether the payer's shipping address is identical to their billing address, streamlining data entry when both match.

billing_address
Type: object|null

The payer's billing address details. Required only when the checkout is configured to collect a billing address.

country_code
Type: string

Specify the unique two-letter country code ( e.g EG, SA or AE ) corresponding to the country where payer is located. This code is part of the standard international country codes set by the ISO .

line_one
Type: string
Min: 2
Max: 255

The primary address line, typically containing the building or house number and street name. This field is required and must precisely identify the street-level location for deliveries, correspondence, and geographic lookups.

line_two
Type: string|null
Min: 2
Max: 255

An optional secondary address line used for additional information like apartment, suite, or building numbers that help refine the location for delivery services.

city
Type: string
Min: 2
Max: 50

This attribute specifies the city in which the address is located. It's essential for routing mail and deliveries within the correct geographical area.

state
Type: string|null
Min: 2
Max: 50

The state or region attribute further narrows down the location, especially in countries with large geographical areas divided into states, provinces, or regions.

zip_code
Type: string|null
Min: 2
Max: 30

Also known as postal code in some regions, this numeric or alphanumeric code is critical for sorting mail and determining delivery routes with precision.

phone_number
Type: string|null
Max: 30

A primary contact number that can be a mobile or cellular number, providing a direct line to the individual or entity associated with the address.

landline_number
Type: string|null
Max: 30

An alternative to the mobile number, this is a fixed-line telephone number associated with the location, useful for contact purposes where mobile signals may be unreliable.

fax_number
Type: string|null
Max: 30

An optional fax number associated with the address. Used to receive documents transmitted over telephone lines in business or institutional contexts where fax communication is still supported.

note
Type: string|null
Min: 2
Max: 255

This free-text field allows for additional information or special instructions related to the address or delivery preferences to be included.

first_name
Type: string|null
Min: 2
Max: 50

The given name of the individual associated with the address, important for personalizing communication and ensuring the correct recipient for mail or services.

last_name
Type: string|null
Min: 2
Max: 50

The family or surname of the individual, completing the personal identification and used in conjunction with the first name for full clarity on the recipient's identity.

location
Type: object|null

This attribute is used to offer a precise, geographical identification of a place, which is crucial for various applications like mapping, navigation, and location-based services.

lat
Type: decimal
Min: -90
Max: 90

The geographic latitude of the address, expressed in decimal degrees. Valid values range from -90 (south pole) to 90 (north pole). Used together with longitude to pinpoint the exact location on a map or coordinate system.

lng
Type: decimal
Min: -180
Max: 180

The geographic longitude of the address, expressed in decimal degrees. Valid values range from -180 (west) to 180 (east). Combined with latitude, provides the precise GPS coordinates required for mapping and location-based services.

country
Type: object

A country object containing the official name, two-letter ISO code, flag emoji, primary language, international dialing code, and ISO currency code.

name
Type: string

The official name of the country in English or In Arabic if the Accepted-Language header is set to ar. This is the commonly recognized name that would be used in international contexts and is essential for any application that references countries by name.

flag
Type: string

A Unicode representation of the country's flag. Unlike an image URL, Unicode flags are character codes that render as the country's flag emoji across compatible digital platforms. This allows for easy integration of flags into text-based content and interfaces without needing external images.

lang
Type: string|null

This attribute represents the primary language spoken in the country. It's typically expressed in ISO 639-1 format, a two-letter code identifying the language, making it easier for applications to adapt content or interfaces according to the user's region.

code
Type: string

The unique two-letter country code ( e.g EG, SA or AE ) corresponding to the country. This code is part of the standard international country codes set by the ISO .

dial_code
Type: string

The international dialing code for the country, such as +1 for the United States, +44 for the United Kingdom or +20 for Egypt. This code is crucial for making international telephone calls and can be used in applications that require user phone number verification.

currency_code
Type: string

This attribute describes the official currency used in the country, typically denoted by its ISO currency code, such as USD for the United States Dollar, EUR for the Euro or EGP for Egyptian Pound.

shipping_address
Type: object|null

The payer's shipping address details. Required only when the checkout is configured to collect a shipping address.

country_code
Type: string

Specify the unique two-letter country code ( e.g EG, SA or AE ) corresponding to the country where payer is located. This code is part of the standard international country codes set by the ISO .

line_one
Type: string
Min: 2
Max: 255

The primary address line, typically containing the building or house number and street name. This field is required and must precisely identify the street-level location for deliveries, correspondence, and geographic lookups.

line_two
Type: string|null
Min: 2
Max: 255

An optional secondary address line used for additional information like apartment, suite, or building numbers that help refine the location for delivery services.

city
Type: string
Min: 2
Max: 50

This attribute specifies the city in which the address is located. It's essential for routing mail and deliveries within the correct geographical area.

state
Type: string|null
Min: 2
Max: 50

The state or region attribute further narrows down the location, especially in countries with large geographical areas divided into states, provinces, or regions.

zip_code
Type: string|null
Min: 2
Max: 30

Also known as postal code in some regions, this numeric or alphanumeric code is critical for sorting mail and determining delivery routes with precision.

phone_number
Type: string|null
Max: 30

A primary contact number that can be a mobile or cellular number, providing a direct line to the individual or entity associated with the address.

landline_number
Type: string|null
Max: 30

An alternative to the mobile number, this is a fixed-line telephone number associated with the location, useful for contact purposes where mobile signals may be unreliable.

fax_number
Type: string|null
Max: 30

An optional fax number associated with the address. Used to receive documents transmitted over telephone lines in business or institutional contexts where fax communication is still supported.

note
Type: string|null
Min: 2
Max: 255

This free-text field allows for additional information or special instructions related to the address or delivery preferences to be included.

first_name
Type: string|null
Min: 2
Max: 50

The given name of the individual associated with the address, important for personalizing communication and ensuring the correct recipient for mail or services.

last_name
Type: string|null
Min: 2
Max: 50

The family or surname of the individual, completing the personal identification and used in conjunction with the first name for full clarity on the recipient's identity.

location
Type: object|null

This attribute is used to offer a precise, geographical identification of a place, which is crucial for various applications like mapping, navigation, and location-based services.

lat
Type: decimal
Min: -90
Max: 90

The geographic latitude of the address, expressed in decimal degrees. Valid values range from -90 (south pole) to 90 (north pole). Used together with longitude to pinpoint the exact location on a map or coordinate system.

lng
Type: decimal
Min: -180
Max: 180

The geographic longitude of the address, expressed in decimal degrees. Valid values range from -180 (west) to 180 (east). Combined with latitude, provides the precise GPS coordinates required for mapping and location-based services.

country
Type: object

A country object containing the official name, two-letter ISO code, flag emoji, primary language, international dialing code, and ISO currency code.

name
Type: string

The official name of the country in English or In Arabic if the Accepted-Language header is set to ar. This is the commonly recognized name that would be used in international contexts and is essential for any application that references countries by name.

flag
Type: string

A Unicode representation of the country's flag. Unlike an image URL, Unicode flags are character codes that render as the country's flag emoji across compatible digital platforms. This allows for easy integration of flags into text-based content and interfaces without needing external images.

lang
Type: string|null

This attribute represents the primary language spoken in the country. It's typically expressed in ISO 639-1 format, a two-letter code identifying the language, making it easier for applications to adapt content or interfaces according to the user's region.

code
Type: string

The unique two-letter country code ( e.g EG, SA or AE ) corresponding to the country. This code is part of the standard international country codes set by the ISO .

dial_code
Type: string

The international dialing code for the country, such as +1 for the United States, +44 for the United Kingdom or +20 for Egypt. This code is crucial for making international telephone calls and can be used in applications that require user phone number verification.

currency_code
Type: string

This attribute describes the official currency used in the country, typically denoted by its ISO currency code, such as USD for the United States Dollar, EUR for the Euro or EGP for Egyptian Pound.

created_at
Type: datetime

The created datetime of the checkout. This attribute can be formatted as an ISO 8601 string or a UNIX timestamp in milliseconds, depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or 1722572118554). By default, the format is UNIX timestamp in milliseconds.

updated_at
Type: datetime

The updated datetime of the checkout. This attribute can be formatted as an ISO 8601 string or a UNIX timestamp in milliseconds, depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or 1722572118554). By default, the format is UNIX timestamp in milliseconds.

Response sample:
JSON
1
{
2
"checkout": {
3 "id": "01hqh45s7826hfwdze8dp1z21f", 4 "payable_id": "01hqh45s7826hfwdze8dp1z21f", 5 "payable_type": "payment.payment_link", 6 "currency_code": "EGP", 7 "paid_amount": 0, 8 "total_amount": 1140, 9 "remaining_amount": 1140, 10 "is_completed": false, 11 "is_coupon_allowed": true, 12 "has_billing_address": false, 13 "has_shipping_address": false, 14 "status": "unpaid", 15 "error_redirect_url": "https://pyngy.com/payment/error", 16 "success_redirect_url": "https://pyngy.com/payment/success", 17 "pay_action": "pay", 18 "fee_strategy": "default", 19
"urls": {
20 "url": "https://pay.payiano.com/checkouts/01hqh45s7826hfwdze8dp1z21f", 21 "qr_code_url": "https://api-pay.payiano.com/v1/checkouts/01hqh45s7826hfwdze8dp1z21f/qrcode" 22 }, 23 "paid_at": null, 24
"payer": {
25 "name": "Mohsen Ali", 26 "email": "mohsen@gawaab.com", 27 "phone_number": "+201000333000", 28 "shipping_address_as_billing_address": true, 29
"billing_address": {
30 "country_code": "EG", 31 "line_one": "7th Makram Ebid, Nasr City", 32 "line_two": "Building 174, apartment 12", 33 "city": "Cairo", 34 "state": "Nasr City", 35 "zip_code": "11321", 36 "phone_number": "+201000333000", 37 "landline_number": "6546543213216", 38 "fax_number": "5456464646", 39 "note": null, 40 "first_name": "Mohsen", 41 "last_name": "Osama", 42
"location": {
43 "lat": 21.32, 44 "lng": 12.63 45 }, 46
"country": {
47 "name": "Egypt", 48 "flag": "🇪🇬", 49 "lang": "AR", 50 "code": "EG", 51 "dial_code": "+20", 52 "currency_code": "EGP" 53 } 54 }, 55
"shipping_address": {
56 "country_code": "EG", 57 "line_one": "7th Makram Ebid, Nasr City", 58 "line_two": "Building 174, apartment 12", 59 "city": "Cairo", 60 "state": "Nasr City", 61 "zip_code": "11321", 62 "phone_number": "+201000333000", 63 "landline_number": "6546543213216", 64 "fax_number": "5456464646", 65 "note": null, 66 "first_name": "Mohsen", 67 "last_name": "Osama", 68
"location": {
69 "lat": 21.32, 70 "lng": 12.63 71 }, 72
"country": {
73 "name": "Egypt", 74 "flag": "🇪🇬", 75 "lang": "AR", 76 "code": "EG", 77 "dial_code": "+20", 78 "currency_code": "EGP" 79 } 80 } 81 }, 82 "created_at": "1722572118554", 83 "updated_at": "1722572118554" 84 } 85}