Payment with token creation

When creating an order, you can request to record the payment details as a token that can be reused.

For this, use the "execute/token" (or "execute-embedded/token") command instead of "execute" when validating the order.

Example of a GET call to fix the order:


When the order is executed, a "token" object is created. Its UUID is the same as for the Order.

It is made up of two elements:
  • A “buyer” object, as defined in the order.
  • A “token” attribute, where the payment method data will be stored.

    See chapter Token management for more information on tokens and aliases.

Then, redirect the Buyer to the URL transmitted in payment_url to proceed to payment with payment method recording.

After the payment, a GET Order will not return the created token.

In order to obtain the token, make a GET token call with the UUID of the Order.

Go to chapter Analyzing the result of a token request to see the result of Get token.