Create a customer
Before creating a Payment Session, you need a customer to associate the payment with. You can either use an existing customer or create a new one using the Customers APIAPI
.
Create a customer
Customer object
Create a Payment Session
To create a Payment SessionAPI
, you need to specify the amount, currency, customer, mode, and payment_method_types. You can optionally include a return_url to redirect customers after the payment is completed.
Create a Payment Session
url parameter.
Payment Session object
Supported payment method types
You can accept payments using the following payment method types:| Type | Description |
|---|---|
card | Credit or debit card |
bacs_debit | Bacs Direct Debit (UK) |
sepa_debit | SEPA Direct Debit (EU) |
autogiro | Autogiro (Sweden) |
bank_transfer | Bank transfer |
direct_transfer | Direct transfer |
pay_by_bank | Pay by Bank (Open Banking) |
Share the Payment Session URL
After creating a Payment Session, share theurl with your customer. They will be guided through a secure flow to complete the payment. Once complete, they will be redirected to your return_url.
You can also set send_email to true to automatically send the URL to the customer’s email address.
Send email to customer
Optional parameters
Reporting type
Use thereporting_type parameter to categorize the payment for reporting purposes. Defaults to charge.
| Type | Description |
|---|---|
advance_rent | Advance rent payment |
charge | General charge (default) |
deposit | Deposit payment |
holding_fee | Holding fee payment |
rent | Rent payment |
Payment Session with reporting type
Statement descriptor
Use thestatement_descriptor parameter to set the text that appears on the customer’s bank statement.
Transaction data
Use thetransaction_data parameter to configure how the resulting transaction should be processed, including transfer behavior and customer balance options.
Payment Session with transaction data
Retrieve a Payment Session
You can retrieve a Payment SessionAPI
to check its status and see the associated transaction.
Retrieve a Payment Session
status field will change to paid and the transaction field will contain the ID of the created transaction.
Completed Payment Session
Cancel a Payment Session
You can cancel a Payment SessionAPI
if it is no longer needed.
Cancel a Payment Session