Create A Purchase Session
The Create endpoint allows you to create a new payment request and retrieve URLs for making and monitoring payments.
If the request is associated with an agreement, the system first checks whether it can be automatically processed according to the agreement rules. If it cannot be processed automatically, a unique payment URL will be generated where the user can complete the payment manually.
In production, the minimum scheduling frequency for recurring payments is once per day. In the test environment, you can schedule as frequently as once per minute for development and testing.
Field descriptions
name(string) — Display name for the payment request (e.g., product or service name).details(string) — Additional description of the payment request.currency(string) — Payment currency (e.g.,USDC).recurring(boolean) — Whether the payment is recurring.amount(number) — Payment amount.metadata(object) — Arbitrary key-value pairs you provide. Returned in every webhook for both success and failure events. Example: setcustomerIdfrom your system to tie all webhook events to a single customer.success_url(string) — Redirect URL after a successful payment.cancel_url(string) — Redirect URL if the customer cancels the payment.interval(string) — Interval unit for recurring payments (e.g.,Minute,Hour,Day,Month).frequency(string) — Number of intervals between each recurring charge (e.g.,"2"withinterval: "Minute"→ every 2 minutes).duration(string) — Number of intervals the subscription will run before ending."0"means no fixed end.expires_in_hours(number) — Number of hours before the payment request expires. After expiration, no purchase requests or signature submission requests will be processed.
Header Parameters
Body Parameters
Shown to payer on payment screen.
Shown to payer on payment screen.
Defaults to USD. Can use another currency type.
Amount of currency.
Optional json data (e.g., invoice number, product ID).
Show child attributes
The url to redirect your payer upon successful payment.
This url to redirect the payer to if they cancel the payment process.
Set as true if used for subscription. Defaults to false
Required if recurring is set as true. If user provides a number, it will represent the number of recurring payments
Required if recurring is set as true.
DayWeekMonthYearRequired if recurring is set a true. Defaults to 0 if not provided
EveryEvery OtherEvery ThirdEvery FourthEvery FifthEvery SixthEvery SeventhResponse
Response Attributes
Show child attributes
Response Attributes
A human-readable text providing additional information, intended to aid the client developer in understanding the error that occurred. This field is optional and should be avoided if there is a concern that it could leak sensitive information.
A code indicating the type of error that occurred. For client authentication failures, invalid_client is commonly used.
Response Attributes
A human-readable text providing additional information, intended to aid the client developer in understanding the error that occurred. This field is optional and should be avoided if there is a concern that it could leak sensitive information.
A code indicating the type of error that occurred. For client authentication failures, invalid_client is commonly used.
Response Attributes
A human-readable text providing additional information, intended to aid the client developer in understanding the error that occurred. This field is optional and should be avoided if there is a concern that it could leak sensitive information.
A code indicating the type of error that occurred. For client authentication failures, invalid_client is commonly used.