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.
/v1/checkout-sessionsList 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
metadataobjectoptionalmetadatakey-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_idstringoptionalOnly return the checkout session for the payment intent specified.
customer_idstringoptionalOnly return the checkout session for the customer specified.
offsetnumberoptionalThe (zero-based) offset of the first item in the collection to return.
limitnumberoptionalThe maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.
Header parameters
payments-accountstringrequiredThe 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_morebooleanrequiredWhether or not there are more elements available after this set. If
false, this set comprises the end of the list.limitnumberoptionalThe maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.
offsetnumberoptionalThe (zero-based) offset of the first item in the collection to return.
totalnumberoptionalThe total items count.
itemsarray of CheckoutSessionrequired
/v1/checkout-sessionsCreate a Checkout Session
Creates a Checkout Session.
Header parameters
payments-accountstringrequiredThe 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_urlstringoptionalIf 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_emailstringoptionalIf 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_idstringoptionalThe ID of the customer for this checkout session.
expires_atstring date-timeoptionalThe due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.
line_itemsarray of CheckoutSessionLineItemrequiredA 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_dataPricerequiredData about the price of this line item.
quantitynumberrequiredQuantity of the item. Maximum decimal places 4.
metadataobjectoptionalSet 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.
''ornull) to them. All keys can be unset by posting an empty value (i.e.{}ornull) tometadata.payment_intent_dataPaymentIntentDataCreateParamsrequiredA subset of parameters to be passed to the payment intent creation.
success_urlstringoptionalThe 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_idstringrequiredThe ID of the account for this checkout session.
amount_totalnumberrequiredTotal of all items, in currency minor units.
cancel_urlstringoptionalIf 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-timerequiredTime at which the object was created.
currencystring (aud | cad | dkk | eur | hkd | jpy | nzd | nok | …)requiredThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
customer_detailsCustomerDetailsoptionalThe customer details.
customer_idstringoptionalThe ID of the customer for this checkout session.
expires_atstring date-timeoptionalThe due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.
idstringrequiredUnique identifier for the object.
line_itemsarray of CheckoutSessionLineItemrequiredA 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.
metadataobjectoptionalSet 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.
''ornull) to them. All keys can be unset by posting an empty value (i.e.{}ornull) tometadata."payment_intent_idstringrequiredThe ID of the payment intent for checkout session.
payment_method_typesarray of string (card | ach_debit | eft_debit | card_present)requiredA list of the types of payment methods (e.g. card) this checkout session is allowed to accept.
statusstring (open | complete | expired)requiredThe status of the checkout session, one of
open,completeorexpired.openThe checkout session is still in progress. Payment processing has not started.completeThe checkout session is complete. Payment processing may still be in progress.expiredThe checkout session has expired. No further processing will occur.success_urlstringoptionalThe 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-timerequiredTime at which the object was last updated.
urlstringrequiredThe URL to the checkout session. Redirect customers to this URL to take them to checkout.
/v1/checkout-sessions/{id}Get a Checkout Session
Retrieves the details of an existing Checkout Session.
Path parameters
idstringrequired
Header parameters
payments-accountstringrequiredThe 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_idstringrequiredThe ID of the account for this checkout session.
amount_totalnumberrequiredTotal of all items, in currency minor units.
cancel_urlstringoptionalIf 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-timerequiredTime at which the object was created.
currencystring (aud | cad | dkk | eur | hkd | jpy | nzd | nok | …)requiredThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
customer_detailsCustomerDetailsoptionalThe customer details.
customer_idstringoptionalThe ID of the customer for this checkout session.
expires_atstring date-timeoptionalThe due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.
idstringrequiredUnique identifier for the object.
line_itemsarray of CheckoutSessionLineItemrequiredA 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.
metadataobjectoptionalSet 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.
''ornull) to them. All keys can be unset by posting an empty value (i.e.{}ornull) tometadata."payment_intent_idstringrequiredThe ID of the payment intent for checkout session.
payment_method_typesarray of string (card | ach_debit | eft_debit | card_present)requiredA list of the types of payment methods (e.g. card) this checkout session is allowed to accept.
statusstring (open | complete | expired)requiredThe status of the checkout session, one of
open,completeorexpired.openThe checkout session is still in progress. Payment processing has not started.completeThe checkout session is complete. Payment processing may still be in progress.expiredThe checkout session has expired. No further processing will occur.success_urlstringoptionalThe 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-timerequiredTime at which the object was last updated.
urlstringrequiredThe URL to the checkout session. Redirect customers to this URL to take them to checkout.
/v1/checkout-sessions/{id}/expireExpire 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-accountstringrequiredThe 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_idstringrequiredThe ID of the account for this checkout session.
amount_totalnumberrequiredTotal of all items, in currency minor units.
cancel_urlstringoptionalIf 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-timerequiredTime at which the object was created.
currencystring (aud | cad | dkk | eur | hkd | jpy | nzd | nok | …)requiredThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
customer_detailsCustomerDetailsoptionalThe customer details.
customer_idstringoptionalThe ID of the customer for this checkout session.
expires_atstring date-timeoptionalThe due date for the checkout session. After this date the customer will no longer be able to complete the checkout session.
idstringrequiredUnique identifier for the object.
line_itemsarray of CheckoutSessionLineItemrequiredA 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.
metadataobjectoptionalSet 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.
''ornull) to them. All keys can be unset by posting an empty value (i.e.{}ornull) tometadata."payment_intent_idstringrequiredThe ID of the payment intent for checkout session.
payment_method_typesarray of string (card | ach_debit | eft_debit | card_present)requiredA list of the types of payment methods (e.g. card) this checkout session is allowed to accept.
statusstring (open | complete | expired)requiredThe status of the checkout session, one of
open,completeorexpired.openThe checkout session is still in progress. Payment processing has not started.completeThe checkout session is complete. Payment processing may still be in progress.expiredThe checkout session has expired. No further processing will occur.success_urlstringoptionalThe 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-timerequiredTime at which the object was last updated.
urlstringrequiredThe URL to the checkout session. Redirect customers to this URL to take them to checkout.
