API Reference
- Purchases
- Payment methods
- Billings
- Clients
- Webhooks
- Public key
- Account
- Company statements
Add subscriber
Add a billing template client and activate recurring billing (is_subscription: true).
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Object ID (UUID)
Connects a Client object to a BillingTemplate having is_subscription = true
to store information about a single subscriber.
You will be able to pause an individual subscription client's cycle by PATCH-ing its' status
field to the value of subscription_paused
.
ID of the Client object to add to the BillingTemplate. Read-only after the BillingTemplateClient has been created. Note that the same Client can be added to a BillingTemplate several times.
For subscriptions, you can edit (PATCH /billing_templates/{id}/clients/{id}/
) this status between active
and subscription_paused
values to pause the client's subscription. Paused subscriptions run as normal, except for purchases not being created and invoices sent for them. It means that if you pause a BillingTemplateClient's monthly subscription cycle a day before the billing date, the next day the invoice will not be issued; but, if you unpause the client a day after the planned billing would have taken place, the planned billing in a month (minus one day) will happen as usual.
Read-only if the BillingTemplateClient is in inactive
(internal status not managed through public API) or pending
(see documentation for POST /billing_templates/{id}/add_subscriber/
) statuses.
An optional whitelist of payment methods availble for purchases generated for this BillingTemplateClient. Copied 1:1 to Purchase.payment_method_whitelist
field on created Purchases (see its description).
Sends invoice when subscription charge fails if this is true
Sends invoice when POST /billing_templates/{id}/add_subscriber/
is called if this is true
Sends receipt when subscription charge succeeds if this is true
Use this request with a BillingTemplate having is_subscription == true
. Two scenarios are possible:
• If subscription_charge_period_end == true
and/or subscription_trial_periods > 0
(first billing should happen after 1 or more billing periods, not today), the request will create a BillingTemplateClient and start trial/schedule billing for it (as required by subscription settings). Successful response will be of form {billing_template_client: <BillingTemplateClient object created>, purchase: null}
: no Purchase is created, BillingTemplateClient.status
is active
immediately.
• If subscription_charge_period_end == false
and subscription_trial_periods == 0
(first billing should occur today), the request will create a BillingTemplateClient with status == pending
and create a Purchase. When such a Purchase is paid, the respective BillingTemplateClient will have its’ subscription activated (starting from the day of payment), with its status
changing to active
. Successful response will be of form {billing_template_client: <BillingTemplateClient object created>, purchase: <Purchase object created>}
: you should redirect your client to purchase.checkout_url
for him to pay immediately (as you do with POST /purchases/
).
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Object ID (UUID)
Body
Connects a Client object to a BillingTemplate having is_subscription = true
to store information about a single subscriber.
You will be able to pause an individual subscription client's cycle by PATCH-ing its' status
field to the value of subscription_paused
.
ID of the Client object to add to the BillingTemplate. Read-only after the BillingTemplateClient has been created. Note that the same Client can be added to a BillingTemplate several times.
For subscriptions, you can edit (PATCH /billing_templates/{id}/clients/{id}/
) this status between active
and subscription_paused
values to pause the client's subscription. Paused subscriptions run as normal, except for purchases not being created and invoices sent for them. It means that if you pause a BillingTemplateClient's monthly subscription cycle a day before the billing date, the next day the invoice will not be issued; but, if you unpause the client a day after the planned billing would have taken place, the planned billing in a month (minus one day) will happen as usual.
Read-only if the BillingTemplateClient is in inactive
(internal status not managed through public API) or pending
(see documentation for POST /billing_templates/{id}/add_subscriber/
) statuses.
pending
, inactive
, active
, subscription_paused
An optional whitelist of payment methods availble for purchases generated for this BillingTemplateClient. Copied 1:1 to Purchase.payment_method_whitelist
field on created Purchases (see its description).
Sends invoice when subscription charge fails if this is true
Sends invoice when POST /billing_templates/{id}/add_subscriber/
is called if this is true
Sends receipt when subscription charge succeeds if this is true
Response
Connects a Client object to a BillingTemplate having is_subscription = true
to store information about a single subscriber.
You will be able to pause an individual subscription client's cycle by PATCH-ing its' status
field to the value of subscription_paused
.
ID of the Client object to add to the BillingTemplate. Read-only after the BillingTemplateClient has been created. Note that the same Client can be added to a BillingTemplate several times.
Object type identifier
Object creation time
Object last modification time
For subscriptions, you can edit (PATCH /billing_templates/{id}/clients/{id}/
) this status between active
and subscription_paused
values to pause the client's subscription. Paused subscriptions run as normal, except for purchases not being created and invoices sent for them. It means that if you pause a BillingTemplateClient's monthly subscription cycle a day before the billing date, the next day the invoice will not be issued; but, if you unpause the client a day after the planned billing would have taken place, the planned billing in a month (minus one day) will happen as usual.
Read-only if the BillingTemplateClient is in inactive
(internal status not managed through public API) or pending
(see documentation for POST /billing_templates/{id}/add_subscriber/
) statuses.
pending
, inactive
, active
, subscription_paused
If not null, reports the date when the next billing is scheduled for this client.
An optional whitelist of payment methods availble for purchases generated for this BillingTemplateClient. Copied 1:1 to Purchase.payment_method_whitelist
field on created Purchases (see its description).
Sends invoice when subscription charge fails if this is true
Sends invoice when POST /billing_templates/{id}/add_subscriber/
is called if this is true
Sends receipt when subscription charge succeeds if this is true
Nullable in POST /billing_templates/{id}/add_subscriber/
response.
Either this or .client_id
is required.
Email address
254
Bank account number (e.g. IBAN)
34
SWIFT/BIC code of the bank
11
Phone number in the <country_code> <number>
format
32
Name and surname of client
128
Personal identification code of client
32
Street house number and flat address where applicable
128
Country code in the ISO 3166-1 alpha-2 format (e.g. 'GB')
2
City name
128
ZIP or postal code
32
State code
128
Street house number and flat address where applicable
128
Country code in the ISO 3166-1 alpha-2 format (e.g. 'GB')
2
City name
128
ZIP or postal code
32
State code
128
Email addresses to receive a carbon copy of all notification emails
Email addresses to receive a blind carbon copy of all notification emails
Legal name of company
128
Company brand name
128
Registration number of company
32
Tax payer registration number
32
Core information about the Purchase, including the products, total, currency and invoice fields. If you're using invoicing via /billing/
or /billing_templates/
, this object will be copied 1:1 from BillingTemplate you specify to the resulting Purchases (also to subscription Purchases).
Line items of the invoice. In case of a transaction with no invoice sent, specify a single Product forming the cost of transaction.
Product name
256
Quantity of these products in invoice
You can use this field or total_override
with a value of 0 to activate preauthorization scenario. See the description of the Purchase.skip_capture
field.
x > 0
Total discount per this product in invoice
x > 0
Percent of tax added to the price of this product
Product category
256
Currency code in the ISO 4217 standard (e.g. 'EUR').
3
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Language code in the ISO 639-1 format (e.g. 'en')
2
10000
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
ClientDetails fields to request from the client before the payment. If a value is passed for a field in ClientDetails, it will be automatically removed from this list.
email
, phone
, full_name
, personal_code
, brand_name
, legal_name
, registration_number
, tax_number
, bank_account
, bank_code
, billing_address
, shipping_address
Timezone to localize invoice-specific timestamps in, e.g. to display a concrete date for a due
timestamp on the invoice.
Whether to permit payments when Purchase's due
has passed. By default those are permitted (and status will be set to overdue
once due
moment is passed). If this is set to true
, it won't be possible to pay for an overdue invoice, and when due
is passed the Purchase's status will be set to expired
.
An optional message to display to your customer in invoice email, e.g. "Your invoice for June".
256
ID of the brand to create this Purchase for. You can copy it down in the API section, see the "specify the ID of the Brand" link in answer to "How to setup payments on website or in mobile app?".
Object type identifier
Object creation time
Object last modification time
Details of an executed transaction. Read-only for Purchase
s and Payout
s. For an unpaid Purchase
, this object will be null
.
Denotes the direction of payment, e.g. for a paid Purchase, is granted to be false
, true
for payouts.
purchase
, purchase_charge
, payout
, bank_payment
, refund
, custom
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Currency code in the ISO 4217 standard (e.g. 'EUR').
3
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
256
When the payment was accepted in (is_outgoing == false
) or sent from (is_outgoing == true
) the gateway system.
If available, this field will report the date the payment was sent by the remote payer (is_outgoing == false
) or when funds arrived to the remote beneficiary (is_outgoing == true
).
Read-only details of issuer company/brand, persisted for invoice display.
Company website URL
500
Street house number and flat address where applicable
128
Country code in the ISO 3166-1 alpha-2 format (e.g. 'GB')
2
City name
128
ZIP or postal code
32
Legal name of company
128
Company brand name
128
Registration number of company
32
Tax payer registration number
32
Payment method-specific, read-only transaction data. Will contain information about all the transaction attempts and possible errors, if available.
Payment method used if Purchase was paid, blank string otherwise.
Extra data associated with selected payment method if Purchase was paid, empty object otherwise. Dataset depends on payment method. E.g. for card payment methods like visa
or mastercard
it will contain properties masked_pan: string
, three_d_secure: boolean
, expiry_month: int
, expiry_year: int
and cardholder_name: string
.
Country code (in the ISO 3166-1 alpha-2 format e.g. 'GB') where payment tool used originates (e.g. in case of card payments, the card issuing country). Will be blank if Purchase was not paid or country could not be detected.
Will contain information about all the payment attempts made and errors encountered, if any.
Type of action attempted
execute
, authorize
, release
, capture
, recurring_execute
, delete_recurring_token
, refund
If this attempt was successful or not. For false
, error
of this attempt will be not null.
Payment method used for this attempt.
Extra data associated with selected payment method. Dataset depends on payment method. E.g. for card payment methods like visa
or mastercard
it will contain properties masked_pan: string
, three_d_secure: boolean
, expiry_month: int
, expiry_year: int
and cardholder_name: string
.
Country code (in the ISO 3166-1 alpha-2 format e.g. 'GB') where payment tool used originates (e.g. in case of card payments, the card issuing country). Will be blank if country could not be detected.
IP the paying client made this attempt from, if available.
Time (if possible, fetched from the remot processing system) this attempt happened at.
Code and description of the error encountered. Not-null if successful
parameter of this attempt is false
.
Available error codes:
unknown_payment_method
: Unknown payment method
invalid_card_number
: Invalid card number
invalid_expires
: Invalid expires
no_matching_terminal
: No matching terminal
blacklisted_tx
: Blacklisted transaction: blocked (general)
timeout_3ds_enrollment_check
: 3DS enrollment check timeout
timeout_acquirer_status_check
: Timeout checking payment status with acquirer
validation_card_details_missing
: Card data field values are missing from request
validation_cvc_not_provided
: cvc
field not provided
validation_cardholder_name_not_provided
: cardholder_name
field not provided
validation_card_number_not_provided
: card_number
field not provided
validation_expires_not_provided
: expires
field not provided
validation_cvc_too_long
: cvc
is too long
validation_cardholder_name_too_long
: cardholder_name
is too long
validation_card_number_too_long
: card_number
is too long
validation_expires_too_long
: expires
is too long
validation_cvc_invalid
: cvc
is invalid
validation_cardholder_name_invalid
: cardholder_name
is too long or invalid
validation_card_number_invalid
: card_number
is invalid
validation_expires_invalid
: expires
is invalid
acquirer_connection_error
: Acquirer connection error
blacklisted_tx_issuing_country
: Blacklisted transaction: issuing country
s2s_not_supported
: Server-to-server flow not supported by processing
timeout
: Operation timeout
general_transaction_error
: Unrecognized transaction error
antifraud_general
: Decline, fraud
acquirer_internal_error
: Acquirer internal error
exceeds_frequency_limit
: Exceeds frequency limit
insufficient_funds
: Insufficient funds
purchase_already_paid_for
: Purchase is already paid for
issuer_not_available
: Issuer Not Available
3ds_authentication_failed
: 3DS authentication failed
do_not_honour
: Do not honour (the transaction was declined by the Issuer without definition or reason).
exceeds_withdrawal_limit
: Exceeds withdrawal limit
exceeded_account_limit
: Exceeded account limit
expired_card
: Expired card
blacklisted_tx_risk_score
: Blacklisted transaction: risk score
transaction_not_supported_or_not_valid_for_card
: The transaction request presented is not supported or is not valid for the card number presented.
exceeded_acquirer_refund_amount
: Exceeded refundable amount defined by acquirer
transaction_not_permitted_on_terminal
: Transaction not permitted on terminal (this card does not support the type of transaction requested).
acquirer_configuration_error
: Acquirer configuration error
transaction_not_permitted_to_cardholder
: Transaction not permitted to cardholder
invalid_issuer_number
: No such issuer (the Issuer number is not valid).
restricted_card
: Restricted card
merchant_response_timeout
: Timeout of merchant response exceeded
reconcile_error
: Reconcilation error
lost_card
: Lost card
stolen_card
: Stolen card
invalid_amount
: Invalid amount
re_enter_transaction
: Re enter transaction
security_violation
: Security violation
partial_forbidden
: Intervene, bank approval required for partial amount
suspected_fraud
: Decline, suspected fraud
acquirer_routing_error
: Acquirer routing error
payment_rejected_other_reason
: Payment rejected (other reason)
authorization_failed
: Payment authorization failed
acquirer_error_cs
: Internal acquirer error. Please, contact support.
decline_irregular_transaction_pattern
: Declined by acquirer - irregular transaction pattern, please contact support
invalid_card_data
: Invalid card data provided
exceeded_terminal_limit
: Exceeded terminal limit
recurring_token_expired
: recurring token expired
soft_decline_contact_support
: Soft Decline - Please contact support for manual settlement of this purchase
payment_method_details_missing
: Missing payment_method_details
Verbose name and explanation of this error.
Purchase status. Can have the following values:
created
: Purchase was created using POST /purchases/ or Billing API capabilities.sent
: Invoice for this purchase was sent over email using Billing API capabilities.viewed
: The client has viewed the payform and/or invoice details for this purchase.error
: There was a failed payment attempt for this purchase because of a problem with customer's payment instrument (e.g. low account balance). You can analyze the.transaction_data
to get information on reason of the failure.cancelled
: Purchase was cancelled using thePOST /purchases/{id}/cancel/
endpoint; payment for it is not possible anymore.overdue
: Purchase is past its'.due
, but payment for it is still possible (unless e.g. POST /purchases/{id}/cancel/ is used).expired
: Purchase is past its'.due
and payment for it isn't possible anymore (as a result ofpurchase.due_strict
having been set totrue
).blocked
: Likeerror
, but payment attempt was blocked due to fraud scoring below threshold or other security checks not passing.hold
: Funds are on hold for this Purchase (.skip_capture: true
was used). You can now runPOST /capture/
orPOST /release/
for this payment to capture the payment or return funds to the client, respectively.released
: This Purchase previously hadhold
status, but funds have since been released and returned to the customer's card.pending_release
: release of funds for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/release/
operation when it takes longer than expected to process on the acquirer side.pending_capture
: capture of funds for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/capture/
operation when it takes longer than expected to process on the acquirer side.preauthorized
: A preauthorization of a card (authorization of card data without a financial transaction) was executed successfully using this Purchase. See the description of the.skip_capture
field for more details.paid
: Purchase was successfully paid for.pending_execute
: Payment (orhold
in case ofskip_capture
) for this Purchase is in processing, but is not finalized on the acquirer side yet.pending_charge
: Recurring payment for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/charge/
operation when it takes longer than expected to process on the acquirer side.cleared
: Funds for this Purchase (that was alreadypaid
) have been transferred for clearing in payment card network. All non-card payment methods and some card payment methods (depends on configuration) don't use this status and Purchases paid using them stay inpaid
status instead.settled
: Settlement was issued for funds for this Purchase (that was alreadypaid
). All non-card payment methods and some card payment methods (depends on configuration) don't use this status and Purchases paid using them stay inpaid
status instead.chargeback
: A chargeback was registered for this, previously paid, Purchase.pending_refund
: a refund (full or partial) for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/refund/
operation when it takes longer than expected to process on the acquirer side.refunded
: This Purchase had its payment refunded, fully or partially.
created
, sent
, viewed
, error
, cancelled
, overdue
, expired
, blocked
, hold
, released
, pending_release
, pending_capture
, preauthorized
, paid
, pending_execute
, pending_charge
, cleared
, settled
, chargeback
, pending_refund
, refunded
History of status changes, latest last. Might contain entry about a related object, e.g. status change to refunded
will contain a reference to the refund Payment.
Purchase status. Can have the following values:
created
: Purchase was created using POST /purchases/ or Billing API capabilities.sent
: Invoice for this purchase was sent over email using Billing API capabilities.viewed
: The client has viewed the payform and/or invoice details for this purchase.error
: There was a failed payment attempt for this purchase because of a problem with customer's payment instrument (e.g. low account balance). You can analyze the.transaction_data
to get information on reason of the failure.cancelled
: Purchase was cancelled using thePOST /purchases/{id}/cancel/
endpoint; payment for it is not possible anymore.overdue
: Purchase is past its'.due
, but payment for it is still possible (unless e.g. POST /purchases/{id}/cancel/ is used).expired
: Purchase is past its'.due
and payment for it isn't possible anymore (as a result ofpurchase.due_strict
having been set totrue
).blocked
: Likeerror
, but payment attempt was blocked due to fraud scoring below threshold or other security checks not passing.hold
: Funds are on hold for this Purchase (.skip_capture: true
was used). You can now runPOST /capture/
orPOST /release/
for this payment to capture the payment or return funds to the client, respectively.released
: This Purchase previously hadhold
status, but funds have since been released and returned to the customer's card.pending_release
: release of funds for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/release/
operation when it takes longer than expected to process on the acquirer side.pending_capture
: capture of funds for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/capture/
operation when it takes longer than expected to process on the acquirer side.preauthorized
: A preauthorization of a card (authorization of card data without a financial transaction) was executed successfully using this Purchase. See the description of the.skip_capture
field for more details.paid
: Purchase was successfully paid for.pending_execute
: Payment (orhold
in case ofskip_capture
) for this Purchase is in processing, but is not finalized on the acquirer side yet.pending_charge
: Recurring payment for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/charge/
operation when it takes longer than expected to process on the acquirer side.cleared
: Funds for this Purchase (that was alreadypaid
) have been transferred for clearing in payment card network. All non-card payment methods and some card payment methods (depends on configuration) don't use this status and Purchases paid using them stay inpaid
status instead.settled
: Settlement was issued for funds for this Purchase (that was alreadypaid
). All non-card payment methods and some card payment methods (depends on configuration) don't use this status and Purchases paid using them stay inpaid
status instead.chargeback
: A chargeback was registered for this, previously paid, Purchase.pending_refund
: a refund (full or partial) for this Purchase is in processing, but is not finalized on the acquirer side yet. Is set byPOST /purchases/{id}/refund/
operation when it takes longer than expected to process on the acquirer side.refunded
: This Purchase had its payment refunded, fully or partially.
created
, sent
, viewed
, error
, cancelled
, overdue
, expired
, blocked
, hold
, released
, pending_release
, pending_capture
, preauthorized
, paid
, pending_execute
, pending_charge
, cleared
, settled
, chargeback
, pending_refund
, refunded
Time the payment form or invoice page was first viewed on
Indicates this is a test object, created using test API keys or using Billing section of UI while in test mode.
ID of user who has created this object in the Billing UI, if applicable.
ID of a BillingTemplate that has spawned this Purchase, if any.
ID of a Client object used to initialize ClientDetails (.client
) of this Purchase. Either this field or specifying .client
object is required (you can only specify a value for one of these fields). All ClientDetails
fields from the Client will be copied to .client
object. Note that editing Client object won't change the respective fields in already created Purchases.
If you specify this field and your client saves a recurring_token
(for instance, by saving their card), the respective ClientRecurringToken will be created. See the /clients/{id}/recurring_tokens/
endpoint.
Whether to send receipt email for this Purchase when it's paid.
Indicates whether a recurring token (e.g. for card payments - card token) was saved for this Purchase. If this is true
, the id
of this Purchase can be used as a recurring_token
in POST /purchases/{id}/charge/
, enabling you to pay for that Purchase using the same method (same card for card payments) that this one was paid with.
ID of a recurring token (Purchase having is_recurring_token == true
) that was used to pay this Purchase, if any.
Card payment-specific: if set to true, only authorize the payment (place funds on hold) when payer enters his card data and pays. This option requires a POST /capture/
or POST /release/
later on.
You can use the preauthorization feature if you set this parameter to true and make the Purchase with purchase.total == 0
(this can be achieved by providing a list of purchase.products
with a total price
of 0, or simply overriding the total using purchase.total_override
to 0). The resulting Purchase can only be "paid" by the client (only cardholder data verification will happen, without a financial transaction) by card and will enforce saving the client's card. When this happens, the Purchase will have status
of preauthorized
and the purchase.preauthorized
webhook callbacks will be emitted.
Trying to use skip_capture (or preauthorization) without any payment methods that support the respective actions (this can be a result of payment_method_whitelist
field being used) will result in an error on Purchase creation request step. Please check the GET /payment_methods/
response for your desired Purchase parameters and/or consult with your account manager.
If the used payment method supports recurring payment functionality, forces the customer's payment credentials to be saved for possible later recurring payments, without giving the customer a choice in the matter.
If you don't provide an invoice reference
yourself, this autogenerated value will be used as a reference instead.
Invoice reference.
128
Value for 'Invoice issued' field. Display-only, does not get validated. If not provided, will be generated as the current date in purchase.timezone
at the moment of Purchase's creation.
When the payment is due for this Purchase. The default behaviour is to still allow payment once this moment passes. To change that, set purchase.due_strict
to true.
Specifies, if the purchase can be refunded fully and partially, only fully, partially or not at all.
all
, full_only
, partial_only
, pis_all
, pis_partial
, none
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
This object is present when automatic currency conversion has occurred upon creation of the purchase. Purchase's original currency was changed and its original amount was converted using the exchange rate shown here.
Currency this purchase was initially created with
Amount this purchase was initially created with
Exchanged rate that was used for currency conversion. Original amount was multiplied by this number to calculate the new purchase amount.
An optional whitelist of payment methods availble for this purchase. Use this field if you want to restrict your payer to pay using only one or several specific methods.
Using this field and at the same time trying to use specific capabilities of a Purchase (e.g. skip_capture
or charging it using a saved card token using POST /purchases/{id}/charge/
) can cause a situation when there are no payment methods available for paying this Purchase. This will cause a validation error on Purchase creation. Please check the GET /payment_methods/
response for your desired Purchase parameters and/or consult with your account manager.
When Purchase is paid for successfully, your customer will be taken to this link. Otherwise a standard screen will be displayed.
500
If there's a payment failure for this Purchase, your customer will be taken to this link. Otherwise a standard screen will be displayed.
500
If you provide this link, customer will have an option to go to it instead of making payment (a button with 'Return to seller' text will be displayed). Can't contain any of the following symbols: <>'"
.
Be aware that this does not cancel the payment (e.g. does not do the equivalent of doing the POST /purchases/{id}/cancel/
request); the client will still be able to press 'Back' in the browser and perform the payment.
500
When Purchase is paid for successfully, the success_callback
URL will receive a POST request with the Purchase object's data in body.
500
Identification of software (e.g. an ecommerce module and version) used to create this purchase, if any.
32
Platform this Purchase was created on.
web
, api
, ios
, android
, macos
, windows
Defines which gateway product was used to create this Purchase.
purchases
, billing_invoices
, billing_subscriptions
, billing_subscriptions_invoice
IP the Purchase was created from.
URL you will be able to access invoice for this Purchase at, if applicable
500
URL you will be able to access the checkout for this Purchase at, if payment for it is possible. When building integrations, redirect the customer to this URL once purchase is created.
You can add the preferred
query arg to the checkout_url
in order to force redirect the client straight to the checkout for a specific payment method (?preferred={payment_method}
, where {payment_method}
is the payment method name as returned by GET /payment_methods/
). If this method redirects the client further to a different system and no customer data entry is needed on gateway's checkout page, your payer will be taken straight to that page (not seeing the gateway's checkout UI); otherwise, he will see the payment method entry UI on the gateway checkout page.
500
URL that can be used for Direct Post integration.
This functionality is activated for each merchant account individually. Please consult with your account manager if you wish to use it.
Will be null if payment for purchase is not possible, purchase.request_client_details
isn't empty or success_redirect/failure_redirect are not provided - these all break the usual direct post flow.
To leverage Direct Post checkout, create a <form>
having method="POST" action="<direct_post_url value>"
and include the following inputs:
cardholder_name: text, Latin letters only (space and apostrophe (
'), dot (
.), dash (
-) symbols are also allowed), max 30 chars
card_number: text, digits only, no whitespace, max 19 chars
expires: text in 'MM/YY' format, digits and a slash only /^\d{2}\/\d{2}$/, max 5 chars
cvc: numeric string of 3 or 4 digits
remember_card: checkbox with value="on" (the default when omitting value attribute of a checkbox input)
Ensure the validation as listed above! Validation errors will be treated as payment failures. Obviously, you can style this form to fit in with the rest of your website.
When your payer submits this form (don't forget a <button>
or <input type="submit">
), he will POST the data directly to the gateway system. There, with minimal interaction with gateway's interface, payment will be processed. In the process, your customer might get redirected to authenticate against 3D Secure system of his card issuer bank (this depends on settings of his card and your account). After that, payer will be taken to success_redirect
or failure_redirect
depending on the payment result (as in the usual payment flow).
Be aware, though, that while not having to process card data allows you not to comply with the entirety of PCI DSS SAQ D requirements, having sensitive cardholder data entry form on your website does raise your PCI DSS scope to SAQ A-EP. Contact your account manager to receive advisory and assistance for this integration method.
500
True if a purchase was manually marked as paid.
ID of corresponding order.