Paying too much to process cards? Get a cheaper quote today.Schedule a call →

Checkout Sessions

4 endpoints. Base URL https://api.paymentsonline.io, sandbox https://api.sandbox-paymentsonline.io.

Every request needs payments-api-key and payments-account.

GET/v1/checkout-sessions

List all Checkout Sessions

Returns a list of Checkout Sessions. The Checkout Sessions are sorted with the most recently created Checkout Session appearing first.

Query parameters

  • metadataobjectoptional

    metadata key-value pairs to filter by. Only exact matches on the key-value pair(s) will be returned. Example: ?metadata[internal_customer_id]=7cb1159d-875e-47ae-a309-319fa7ff395b.

  • payment_intent_idstringoptional

    Only return the checkout session for the payment intent specified.

  • customer_idstringoptional

    Only return the checkout session for the customer specified.

  • offsetnumberoptional

    The (zero-based) offset of the first item in the collection to return.

  • limitnumberoptional

    The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Responses

200PaginatedDto | object

  • has_morebooleanrequired

    Whether or not there are more elements available after this set. If false, this set comprises the end of the list.

  • limitnumberoptional

    The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

  • offsetnumberoptional

    The (zero-based) offset of the first item in the collection to return.

  • totalnumberoptional

    The total items count.

  • itemsarray of CheckoutSessionrequired

POST/v1/checkout-sessions

Create a Checkout Session

Creates a Checkout Session.

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Request body application/jsonrequired

  • cancel_urlstringoptional

    If set, checkout will display a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

  • customer_emailstringoptional

    If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once a session is complete, use the customer_id field to fetch the customer.

  • customer_idstringoptional

    The ID of the customer for this checkout session.

  • expires_atstring date-timeoptional

    The due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.

  • line_itemsarray of CheckoutSessionLineItemrequired

    A list of items the customer is purchasing. The maximum is 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.

    • price_dataPricerequired

      Data about the price of this line item.

    • quantitynumberrequired

      Quantity of the item. Maximum decimal places 4.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value (i.e. '' or null) to them. All keys can be unset by posting an empty value (i.e. {} or null) to metadata.

  • payment_intent_dataPaymentIntentDataCreateParamsrequired

    A subset of parameters to be passed to the payment intent creation.

  • success_urlstringoptional

    The URL to which we should send customers when payment is complete. It is recommended that you supply this value, but if none is provided, a generic success landing page will be used.

Responses

201CheckoutSession

  • account_idstringrequired

    The ID of the account for this checkout session.

  • amount_totalnumberrequired

    Total of all items, in currency minor units.

  • cancel_urlstringoptional

    If set, checkout will display a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

  • created_atstring date-timerequired

    Time at which the object was created.

  • currencystring (aud | cad | dkk | eur | hkd | jpy | nzd | nok | …)required

    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.

  • customer_detailsCustomerDetailsoptional

    The customer details.

  • customer_idstringoptional

    The ID of the customer for this checkout session.

  • expires_atstring date-timeoptional

    The due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.

  • idstringrequired

    Unique identifier for the object.

  • line_itemsarray of CheckoutSessionLineItemrequired

    A list of items the customer is purchasing. The maximum is 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.

  • metadataobjectoptional

    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. Individual keys can be unset by posting an empty value (i.e. '' or null) to them. All keys can be unset by posting an empty value (i.e. {} or null) to metadata."

  • payment_intent_idstringrequired

    The ID of the payment intent for checkout session.

  • payment_method_typesarray of string (card | ach_debit | eft_debit | card_present)required

    A list of the types of payment methods (e.g. card) this checkout session is allowed to accept.

  • statusstring (open | complete | expired)required

    The status of the checkout session, one of open, complete or expired. open The checkout session is still in progress. Payment processing has not started. complete The checkout session is complete. Payment processing may still be in progress. expired The checkout session has expired. No further processing will occur.

  • success_urlstringoptional

    The URL to which we should send customers when payment is complete. It is recommended that you supply this value, but if none is provided, a generic success landing page will be used.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

  • urlstringrequired

    The URL to the checkout session. Redirect customers to this URL to take them to checkout.

GET/v1/checkout-sessions/{id}

Get a Checkout Session

Retrieves the details of an existing Checkout Session.

Path parameters

  • idstringrequired

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Responses

200CheckoutSession

  • account_idstringrequired

    The ID of the account for this checkout session.

  • amount_totalnumberrequired

    Total of all items, in currency minor units.

  • cancel_urlstringoptional

    If set, checkout will display a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

  • created_atstring date-timerequired

    Time at which the object was created.

  • currencystring (aud | cad | dkk | eur | hkd | jpy | nzd | nok | …)required

    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.

  • customer_detailsCustomerDetailsoptional

    The customer details.

  • customer_idstringoptional

    The ID of the customer for this checkout session.

  • expires_atstring date-timeoptional

    The due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.

  • idstringrequired

    Unique identifier for the object.

  • line_itemsarray of CheckoutSessionLineItemrequired

    A list of items the customer is purchasing. The maximum is 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.

  • metadataobjectoptional

    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. Individual keys can be unset by posting an empty value (i.e. '' or null) to them. All keys can be unset by posting an empty value (i.e. {} or null) to metadata."

  • payment_intent_idstringrequired

    The ID of the payment intent for checkout session.

  • payment_method_typesarray of string (card | ach_debit | eft_debit | card_present)required

    A list of the types of payment methods (e.g. card) this checkout session is allowed to accept.

  • statusstring (open | complete | expired)required

    The status of the checkout session, one of open, complete or expired. open The checkout session is still in progress. Payment processing has not started. complete The checkout session is complete. Payment processing may still be in progress. expired The checkout session has expired. No further processing will occur.

  • success_urlstringoptional

    The URL to which we should send customers when payment is complete. It is recommended that you supply this value, but if none is provided, a generic success landing page will be used.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

  • urlstringrequired

    The URL to the checkout session. Redirect customers to this URL to take them to checkout.

POST/v1/checkout-sessions/{id}/expire

Expire a Checkout Session

Expires a Checkout Session. A Checkout Session can only be expired if its status is open. Once expired, the customer cannot complete the Checkout Session and will see a message about the expiration.

Path parameters

  • idstringrequired

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Responses

201CheckoutSession

  • account_idstringrequired

    The ID of the account for this checkout session.

  • amount_totalnumberrequired

    Total of all items, in currency minor units.

  • cancel_urlstringoptional

    If set, checkout will display a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

  • created_atstring date-timerequired

    Time at which the object was created.

  • currencystring (aud | cad | dkk | eur | hkd | jpy | nzd | nok | …)required

    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.

  • customer_detailsCustomerDetailsoptional

    The customer details.

  • customer_idstringoptional

    The ID of the customer for this checkout session.

  • expires_atstring date-timeoptional

    The due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.

  • idstringrequired

    Unique identifier for the object.

  • line_itemsarray of CheckoutSessionLineItemrequired

    A list of items the customer is purchasing. The maximum is 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.

  • metadataobjectoptional

    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. Individual keys can be unset by posting an empty value (i.e. '' or null) to them. All keys can be unset by posting an empty value (i.e. {} or null) to metadata."

  • payment_intent_idstringrequired

    The ID of the payment intent for checkout session.

  • payment_method_typesarray of string (card | ach_debit | eft_debit | card_present)required

    A list of the types of payment methods (e.g. card) this checkout session is allowed to accept.

  • statusstring (open | complete | expired)required

    The status of the checkout session, one of open, complete or expired. open The checkout session is still in progress. Payment processing has not started. complete The checkout session is complete. Payment processing may still be in progress. expired The checkout session has expired. No further processing will occur.

  • success_urlstringoptional

    The URL to which we should send customers when payment is complete. It is recommended that you supply this value, but if none is provided, a generic success landing page will be used.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

  • urlstringrequired

    The URL to the checkout session. Redirect customers to this URL to take them to checkout.