Restrict Payments To An Age Limit
Swedbank Pay provides the possibility to restrict payments to an age limit with payment methods which support this. This can be used when you want to make sure you only accept payments from individuals over a certain age. You are currently only able to restrict Swish payments to an Age Limit, but we will add support for more payment methods going forward. No changes are required at your (the merchant’s) end to be able to offer more methods at a later time.
The way you use this feature is by adding the field restrictedToAgeLimit
in
your payment order request and setting it to the age limit you wish to restrict
your payments to. This will leave out all methods which do not support this
feature. For instance, set restrictedToAgeLimit
to 20 if you only want to
accept payments from individuals over the age 20. Methods supporting the
feature will reject payments that do not meet the restriction.
Restrict Payments To An Age Limit Request
You need to add an int
field called restrictedToAgeLimit
in your payment
order request and set it to your desired age limit, i.e. 20.
Below is a shortened example of a payment order request. Apart from the new field, the payment request is similar to a standard payment order request. For an example of a payment order request,
The response will be similar to a standard payment order response, which is also documented on the page linked above.
Request
1
2
3
4
POST /psp/paymentorders HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x/2.0 // Version optional for 3.0 and 2.0
1
2
3
4
5
{
"paymentorder": {
"restrictedToAgeLimit": 20,
}
}
Required | Field | Type | Description |
---|---|---|---|
check | paymentOrder |
object |
The payment order object. |
restrictedToAgeLimit |
int |
Used for setting the age you want to restrict the payment to. |