Launch Twisto Universal API (deprecated)

This API is deprecated!

New integrations should go through PSP API

Integration process

During the registration process of your company we do require settlement bank account, billing information and webhooks url that's for all registered Merchants/Eshops.

The integration process can be split into these major parts that are described in more detail below:

  • Receiving data from PSP (pushed via API at API).
  • Providing UI for customers to fill in missing personal data and to agree to the Terms of Service
  • Performing operations in other parts of Twisto backend (like credit risk scoring and generating, canceling, activating and returning invoices) Once the decision process starts, webhook notification with checking status is triggered. Possible decision outcomes:
    • approved - webhook notification with accepted status is sent
    • rejected - webhook notification with rejected status is sent
    • error - webhook notification with error status is sent
  • After the decision is made, the customer is automatically redirected within 5 seconds to the URL that was provided during order creation in step 1.
  • Settling the funds (sending money to PSP, receiving refund money from PSP)
  • Notifying PSP (via Webhook)

Activation

In case accepted notification is received, it needs to be activated via POST order/{order_id}/activate which informs Twisto to send invoice to the customer and mark as paid/finished. After execution, order is in activated state.

Cancelation

It is possible to cancel order before order activation via POST /order/{order_id}/cancel. After execution, order is in canceled state.

Refund

It is possible to fully or partially refund order after order activation via POST /order/{order_id}/refund. After execution, order is in activated state for full refund and stays in activated state for partial refund.

Transaction Status Flow

Transaction Sequential Diagram

Twisto Transaction Sequential Flow Diagram

Order webhook notifications

To inform about order changes Twisto sends notifications via webhooks. Notification is sent when:

  • order status changed to one of the states:
    • rejected
    • accepted
    • error
    • canceled
    • activated
    • refunded
    • checking
  • Twisto transferred money which is marked as a datetime field 'date_settled' in the notification

Note: Request contains our custom user-agent: Twisto/PSP. Inform partners to allow it.