Alma
Beta
Last updated: November 9, 2022
Alma's Pay Later payment solution enables customers to pay for their purchase after a 15 or 30-day delay.
Information
To enable Alma payments on your account, contact your Account Manager or [email protected].
Model | Gateway |
---|---|
Payment flow | Redirect |
Payment method type | Buy now, pay later (BNPL) |
One-step payment | |
Authorization | |
Capture | |
Refund | |
Partial refund | |
Chargeback | |
Recurring payment |
Alma has a two-step process:
For the full API specification, see the API reference.
post
https://api.checkout.com/payments
If a customer ID or email is not provided in the request, we automatically create a customer profile and return the customer ID in the response.
1{2"amount": 6001,3"currency": "EUR",4"source": {5"type": "alma",6"billing_address": {7"address_line1": "123 High St.",8"address_line2": "Flat 456",9"city": "London",10"zip": "SW1A 1AA",11"country": "GB"12}13},14"failure_url": "https://example.com/payments/failure",15"success_url": "https://example.com/payments/success",16"reference": "ORD-5023-4E89",17"customer": {18"name": "John Smith",19"email": "[email protected]",20"phone": {21"country_code": "+44",22"number": "1234 567890"23}24},25"shipping": {26"address": {27"address_line1": "123 High St.",28"address_line2": "Flat 456",29"city": "London",30"zip": "SW1A 1AA",31"country": "GB"32}33},34"capture": true35}
If you receive a 202 Accepted
response with a payment id
and a status
field set to Pending
, your request was successful.
1{2"id": "pay_uexsi2rik7ceppidytigjmxshi",3"status": "Pending",4"reference": "ORD-5023-4E89",5"customer": {6"id": "cus_rckdrxsk5j7efn7slcem7rofve",7"email": "[email protected]",8"name": "John Smith",9"phone": {10"number": "1234 567890",11"country_code": "+44"12}13},14"processing": {15"partner_payment_id": "payment_11uwPpq2eBVJV3QMphBQk2OIsUnkE1sKay"16},17"_links": {18"self": {19"href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi"20},21"redirect": {22"href": "https://pay.staging.getalma.eu/11uwPpq2eBVJV3QMphBQk2OIsUnkE1sKay"23}24}25}
Redirect your customer to the redirect
link’s href
in the response. This will allow the customer to authorize the payment, before they are transferred to your predefined success or failure URL.
You can retrieve details about an existing Alma payment with the following endpoint.
Use the details below to set up your request.
For the full API specification, see the API reference.
post
https://api.checkout.com/payments/{id}
1{2"id": "pay_uexsi2rik7ceppidytigjmxshi",3"requested_on": "2022-07-11T08:59:44.7324985Z",4"source": {5"type": "alma"6},7"amount": 6001,8"currency": "EUR",9"payment_type": "Regular",10"reference": "ORD-5023-4E89",11"status": "Pending",12"customer": {13"id": "cus_rckdrxsk5j7efn7slcem7rofve",14"email": "[email protected]",15"name": "John Smith",16"phone": {17"country_code": "+44",18"number": "1234 567890"19}20},21"shipping": {22"address": {23"address_line1": "123 High St.",24"address_line2": "Flat 456",25"city": "London",26"zip": "SW1A 1AA",27"country": "GB"28}29},30"processing": {31"partner_payment_id": "payment_11uwPpq2eBVJV3QMphBQk2OIsUnkE1sKay"32},33"_links": {34"redirect": {35"href": "https://pay.staging.getalma.eu/11uwPek5EdoeqjdWXtgCUaqvSROlz7T2WD"36},37"self": {38"href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi"39},40"actions": {41"href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi/actions"42}43}44}
Alma supports both partial and full refunds. You can refund a payment through the Dashboard or using the Refund API.
post
https://api.checkout.com/payments/{id}/refunds
1{2"amount": 103}
1{2"action_id": "act_f544khcfnyqudh3l73qwnnvfbi",3"_links": {4"payment": {5"href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi"6}7}8}
Once a payment is created, you cannot void it. If you wish to void a payment in progress, please wait for the payment_captured
webhook, and then process a refund. Communicating this in advance to your end customer can help you avoid chargebacks.
If the customer cancels or fails to complete their payment, we will send a payment_expired
webhook.
You may receive the following webhooks when using Alma. View all of our webhook notifications.
Webhook | Description |
---|---|
| Sent when a payment request has been successfully initiated. |
| Sent when a payment request has expired. |
| Sent when a payment request has been rejected. |
| Sent when the payment has been successfully captured. |
| Sent when the payment has been (fully or partially) refunded. |
| Sent when a refund has been declined. |
To start testing, you'll need to contact your Account Manager or Implementation Engineer to activate Alma payments in the sandbox environment.
- Create an Alma transaction as above, following the redirect link in the response to Alma’s website.
- Enter the name and the test card details that we have provided you with.
- Enter the test phone numbers that we have provided you with. Confirm the message code you received on the test phone number.
- Select Submit. You should then be redirected to your predefined success URL.