Create a redirect transaction
Create a payment with an alternative payment method like PayPal or GoCardless.
A transaction can be created for non-card services by calling the
POST /transactions
API. The call requires an amount
, currency
, and
a payment_method
with a redirect_url
, country
and currency
.
At the moment, our API allows you to create transactions for the services below:
- Banked
- GoCardless
- PayPal
There is little need to use these APIs directly if you are using [Embed] instead. [Embed] automatically creates transactions against these APIs and can even bind them to a previously created buyer.
Transacting with a non-card account is a 2-step process that requires a buyer to be redirected to get explicit authorization.
Step 1. Initialize a new transaction
The first step is to initialize a new transaction. A redirect_url
needs to be
provided to redirect the user back to your application after they have approved
the transaction in the external service. The country
and currency
are optional
but sometimes are required depending on the service used.
The API returns a new transaction
resource for which the status
is set to
buyer_approval_pending
.
Statuses
See our guide on transaction statuses for more details.
Step 2. Redirect the user
For the next step, you will need to redirect the buyer to the URL specified in
the payment_method.approval_url
field of the response.
The buyer then has to approve the transaction. After this, the buyer is
redirected back to the redirect_url
you specified earlier. For example:
The transaction_id
query parameter represents the ID of the transaction and
the transaction_status
represents the new status of the transaction.
(Optional) Step 3. Confirm the transaction
Finally, you could make an optional API call to confirm the transaction has been successfully authorized or captured.
The API will return the same transaction
resource with its updated status.
Was this page helpful?