Initial payment

Initialize a subscription order and generate a payment token for future transactions.

Body Params
string
enum
  • redirect: Customers are redirected to a payment page where they enter their cardholder data.
  • direct: The API request contains the cardholder data, so customers are redirected to an authentication or success page.

If not set, redirect is used.

For more information, see Direct vs redirect.

Note: To process direct card payments, you must have PCI DSS certification, see Cardholder data.

Allowed:
string
enum
required

The unique identifier for the payment method (gateway). See Gateway IDs.

Using the generic CREDITCARD gateway improves the customer experience. For redirect requests, the payment page automatically detects the card scheme.

string
required
length ≤ 50

Your unique (client-defined) identifier for the order.

string
required
length between 3 and 3

The currency of the payment.

Format: ISO-4217 currency code.

integer
required
≥ 0

The payment amount in the currency's smallest unit:

  • Decimal currencies: Value for 10 EUR = 1000 (1000 cents)
  • Zero-decimal currencies: Value for 10 JPY = 10

Discounts

To discount:

  • An entire order, enter a reduced amount.
  • Specific items in the order, in the shopping_cart, reduce the unit_price of the relevant items.

Zero Authorization

For Zero Authorization orders, set to 0.

string
required
length ≤ 200

A description of the customer's order.

Appears on payment pages and customer bank statements (if supported by the bank).

Does not appear on FastCheckout pages (in your dashboard only).

payment_options
object

Contains:

  • URLs to your success page and cancel page. Make sure your URL only contains specific set of ASCII characters (alphanumeric, -, _, ., :, /).
  • Your webhook endpoint
  • Templates for styling payment pages
  • Settings for displaying available gift cards
customer
object

The customer’s personal information.

Required for: All orders except Apple Pay and Google Pay, and Belfius, iDEAL, and WeChat Pay direct orders.

For recurring payments, see reference. For localizing payment pages and FastCheckout pages, see locale.

gateway_info
object

Information specific to the payment method (gateway).

Required for:

delivery
object

The customer's shipping address.

checkout_options
object

Settings for the shopping cart, including taxes and validation.

shopping_cart
object

The array of items in the customer's shopping cart, including the shipping costs, and the tax class (as defined in checkout_options).

We recommend using shopping carts for all orders.

Displays on payment pages, and in your dashboard.

To learn how to calculate the order amount from the shopping_cart, see Rounding rule.

Discounts

string

Displays additional information on payment pages and in payment confirmation emails to customers using HTML, e.g. display order items instead of including a shopping_cart.

For information about supported HTML tags and elements, see Payment pages - Styling.

recurring
object
required

Configuration required for recurring payments.

string
enum

For manual capture orders (required).

Allowed:
affiliate
object

For Split Payments (required).

second_chance
object
customer_verification
object
custom_info
object

Additional information about the order.

integer
1 to 365
Defaults to 30

For checkout, paymentlink, and redirect orders, sets the number of days the link to the payment page or FastCheckout page is valid.

The link lifetime begins when the order is created, or the link is generated. A session_id is returned in the payment page URL.

If Second Chance is enabled, we recommend a minimum lifetime of 48 hours. Second Chance emails the customer 2 payment reminders: 1 hour and 24 hours after the order is created. If the lifetime is less than 24 hours, the link in the second email is no longer active when the customer receives it.

See seconds_active below. If seconds_active is also set, seconds_active is used. If neither is set, the default is used.

string
1 to 31536000
Defaults to 2592000

For checkout, paymentlink, and redirect orders, sets the number of seconds the link to the payment page or FastCheckout page is valid.

See days_active above. If days_active is also set, seconds_active is used. If neither is set, the default is used.

string
length ≤ 500

Variable for storing additional data.

string
length ≤ 500

Variable for storing additional data.

string
length ≤ 500

Variable for storing additional data, including split payments metadata.

plugin
object

Information about your integration (useful for debugging).

Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json