Twisto Universal API (deprecated)

Universal API is the API for Payment Gateways (PSP).

This API is deprecated!

New integrations should go through PSP API

Twisto “Buy now. Pay later” is a payment method that allows customers to make instant one click purchase with payment after the purchase. Payment service provider (PSP) receives full payment from Twisto after goods are shipped. Customer repays to Twisto’s bank account on the basis of payment information sent via email by Twisto.

Since Twisto takes the risk of customer repayment every order is subject to real-time credit check. For this reason, we have specific requirements for data that we need from the PSP. The exact requirements are described in the integration steps below. Customer scoring is our internal process that is dynamic and depends on external data sources collected during the check. For this reason, it cannot be implemented completely on the PSP’s side, but is fully run by Twisto.

PSP app serves as a generic integration gateway between different Payment Service Providers and Twisto. Its main purpose is to enable Twisto Pay on the Payment Service Provider's platform for its merchants.

It does this by providing common API for Payment Service Providers and UI for customers that support complete payment process from registering a merchant, registering an eshop, accepting customer's order, prompting customer for missing personal data, acquiring customers consent with the Terms of Service, scoring the customer with respect to his order, order settlement to handling refunds.

The result is that the Payment Service Provider only needs to connect to this API to provide all its merchants and eshops with the functionality of delayed payments and thus increasing their upsale.

In general each PSP can have multiple merchants and each merchant multiple eshops.

Expected errors

Here is a table of errors that API may return for your order creation request:

StatusErrorsDataDescription
403E.g. "errors": {"service": ["\"\" is not a valid choice."]}-Some fields in the request body are not valid.
403"errors": {"non_field_errors": ["Customer has installments blocked"]}}-Checkout was rejected for this customer because: {{Message}}.
403"errors": {"non_field_errors": ["Customer is overdue"]}}-Checkout was rejected for this customer because: {{Message}}.
403"errors": {"non_field_errors": ["Customer has terminated contract"]}}-Checkout was rejected for this customer because: {{Message}}.
403"errors": {"non_field_errors": ["Installments over customer limit"]}}-Checkout was rejected for this customer because: {{Message}}.
403"errors": {"non_field_errors": ["Customer is over monthly installments limit"]}}-Checkout was rejected for this customer because: {{Message}}.
403"errors": {"non_field_errors": ["Unpaid amount not large enough"]}}-Order amount is not large enough for this payment service.
400"errors": {"non_field_errors": ["Invalid service: Pay in three (2) on psp.Order 123"]}}-The selected payment service is not available.

Customer flow

Customer flow

Settlement

  • Settlement strategy is set up on PSP level
  • There are 2 strategies for refunds and 2 strategies for payments
  • Refunds
    • Manual - refunds are sent by PSP via actual money transfers
    • Batch - sum of refunds is subtracted from the sum of orders from the previous day (no money transfer from PSP) - only possible with bulk payouts
  • Payment
    • Individual bank transaction for every order
    • Bulk payments - all orders (and refunds) are aggregated and sent in a single bank transaction
  • Results in two general settlement strategies
    • One by one - manual refunds + individual / bulk transactions
    • One daily bach - batch refunds + bulk transactions

Settlement Strategy - One by one

Twisto Transaction Status Flow Image

Settlement Strategy - One daily batch

Twisto Transaction Status Flow Image

Refund process

  • PSP will send POST request on Twisto API to initiate Refund process
  • Refund will be registered immediately after getting request from PSP
  • According to Refund Strategy refund will be fully confirmed when
    • Manual Refund Strategy - once Twisto gets refund payment booked on Twisto account
    • Batch Refund Strategy - once Twisto generate and sent batch transfer where the amount of refunds is deducted from settlement amount