Payments only integration
Learn how to integrate Signup+ with the payments only flow.
There are two ways to integrate Signup+ with payments in the UK:
- Create a payment which is subject to automated 18+ age verification checks
- Retrieve the remitter's identity data associated with a payment, after settlement.
Automated 18+ age check for payments
Create payments which only settle in your merchant account if the remitter is more than 18 years old.
This integration option is a great fit for signup processes where you would like to verify that the user is of legal age, and you don't want to deal with refunding payments from remitters under the age limit.
Possible delay in payment verification
Usually, TrueLayer can verify a remitter’s age after funds are held in a suspense account, and transition the payment to a terminal status within 15 seconds. However, in the worst case scenario, TrueLayer’s checks can take up to 2 minutes. If you want to cancel your onboarding flow earlier, ensure to refund any payments that could settled after that cancellation.
Create a verified payment
Follow this guide and specify the beneficiary.remitter_date_of_birth
flag to create a payment with an automated legal age check.
You must also set the related_products
object with the value of signup_plus
in your payment creation.
Retrieve the remitter's identity data through a settled payment
Create a payment (regular or age-verified), and then make a request to the Signup+ Get identity by payment id endpoint to get the remitter's identity data.
To integrate Signup+ with payments, there are four key steps:
- Enable the
signupplus
scope - Generate an access token with the
payments
andsignupplus
scopes - Create and authorise a payment
- Retrieve user data with the payment
id
Enable the signupplus
scope
signupplus
scopeTo verify that your client application has the signupplus
scope, go to Console > Data API > Auth link builder > Product Permissions.
The signupplus
scope is available by default in the sandbox environment. To enable and use this scope in the live environment, contact Support.
Generate an access token with payments
and signupplus
scopes
payments
and signupplus
scopesTo use the Signup+ API, you need an access token. Generate one by calling the /connect/token
endpoint with your client credentials, using the above mentioned payments
and signupplus
scopes.
You can also use the Signup+ collection to test API requests, including the request to generate an access token.
Create and authorise a payment
To integrate with Signup+, you need a payment id
. To get this, create a payment.
To fetch user identity for the payment, you must set the related_products
object with the value of signup_plus
as part of your payment request. Otherwise, your request for user identity will be rejected. If you don't intend to collect user identity information as part of the payment, you don't need to set this value.
The payment id
will be present in the API response.
For more information, see the Payments API v3 documentation or the payments quickstart guide.
If you integrate with the hosted payments page, add signup=true
as a hash parameter to the URL. For example:
https://payment.truelayer-sandbox.com/payments#signup=true&payment_id=6755dacf-7dd8-4577-ba11-667b6aca8474&resource_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiJwZW5ueWRldi1lNTkzOGEiLCJqdGkiOiI2NzU1ZGFjZi03ZGQ4LTQ1NzctYmExMS02NjdiNmFjYTg0YmYiOjE2MzQ2Mzk1NDQsImV4cCI6MTYzNDY0MDQ0NCwiaXNzIjoiaHR0cHM6Ly9hcGkmRldiIsImF1ZCI6Imh0dHBzOi8vYXBpLnQ3ci5kZXYifQ.vlEvoSdFv8g7t21RlXYyus01uEZlalK89P4Ii7Avl_8&return_uri=http://localhost:3000/redirect
When you receive the payment_executed webhook, use the payment id
as input for Signup+.
Retrieve user identity with the payment id
id
Once your payment is settled
, use its id
in a request to the Signup+ Get identity by payment id endpoint. If you are fetching identity data for a new user, the request should be made within 15 minutes of payment settlement. The time limit does not apply for any subsequent requests.
https://api.truelayer.com/signup-plus/payments?payment_id={paymentId}
In a successful response, you'll receive the remitter's identity information in this format:
{
"title": "Mr",
"first_name": "Wallace",
"last_name": "Wensleydale",
"date_of_birth": "07/08/1959",
"address": {
"address_line1": "62 West Wallaby Street",
"city": "Wigan",
"state": "Lancashire",
"zip": "L18 9HA",
"country_code": "GB"
},
"account_details": {
"sort_code": "{SORTCODE}",
"account_number": "{ACCOUNTNUMBER}"
}
}
Next Steps
If you need to, learn how to make payouts or refunds.
Updated 3 months ago