Skip to content

Alma Beta

Last updated: November 09, 2022

We offer Alma's Pay Later payment solution, allowing your customers to split the payment into multiple installments.

To start accepting Alma payments, contact your Customer Success Manager.

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 2-step process:


Request a payment

For the full API specification, see the API reference.

    post

    https://api.checkout.com/payments

    Copied!

    Request example

    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
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    {
    "amount": 6001,
    "currency": "EUR",
    "source": {
    "type": "alma",
    "billing_address": {
    "address_line1": "Checkout.com",
    "address_line2": "90 Tottenham Court Road",
    "city": "London",
    "state": "London",
    "zip": "W1T 4TJ",
    "country": "UK"
    }
    },
    "failure_url": "https://example.com/success",
    "success_url": "https://example.com/failure",
    "reference": "ORD-5023-4E89",
    "customer": {
    "name": "Cecilia Chapman",
    "email": "c.chapman@example.com",
    "phone": {
    "country_code": "+33",
    "number": "123456789"
    }
    },
    "shipping": {
    "address": {
    "address_line1": "Checkout.com",
    "address_line2": "90 Tottenham Court Road",
    "city": "London",
    "state": "London",
    "zip": "W1T 4TJ",
    "country": "UK"
    }
    },
    "capture": true
    }

    Response example

    If you receive a 202 Accepted response with a payment id and a status field set to Pending, your request was successful.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    {
    "id": "pay_uexsi2rik7ceppidytigjmxshi",
    "status": "Pending",
    "reference": "ORD-5023-4E89",
    "customer": {
    "id": "cus_rckdrxsk5j7efn7slcem7rofve",
    "email": "c.chapman@example.com",
    "name": "Cecilia Chapman",
    "phone": {
    "number": "123456789",
    "country_code": "+33"
    }
    },
    "processing": {
    "partner_payment_id": "payment_11uwPpq2eBVJV3QMphBQk2OIsUnkE1sKay"
    },
    "_links": {
    "self": {
    "href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi"
    },
    "redirect": {
    "href": "https://pay.staging.getalma.eu/11uwPpq2eBVJV3QMphBQk2OIsUnkE1sKay"
    }
    }
    }

    Redirect the customer

    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.


    Get details about a payment

    You can retrieve details about an existing Alma payment with the following endpoint.

    Use the details below to set up your request.

    Endpoints

    For the full API specification, see the API reference.

      post

      https://api.checkout.com/payments/{id}

      Copied!

      Response example

        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45
        {
        "id": "pay_uexsi2rik7ceppidytigjmxshi",
        "requested_on": "2022-07-11T08:59:44.7324985Z",
        "source": {
        "type": "alma"
        },
        "amount": 6001,
        "currency": "EUR",
        "payment_type": "Regular",
        "reference": "ORD-5023-4E89",
        "status": "Pending",
        "customer": {
        "id": "cus_rckdrxsk5j7efn7slcem7rofve",
        "email": "c.chapman@example.com",
        "name": "Cecilia Chapman",
        "phone": {
        "country_code": "+33",
        "number": "123456789"
        }
        },
        "shipping": {
        "address": {
        "address_line1": "Checkout.com",
        "address_line2": "90 Tottenham Court Road",
        "city": "London",
        "state": "London",
        "zip": "W1T 4TJ",
        "country": "UK"
        }
        },
        "processing": {
        "partner_payment_id": "payment_11uwPpq2eBVJV3QMphBQk2OIsUnkE1sKay"
        },
        "_links": {
        "redirect": {
        "href": "https://pay.staging.getalma.eu/11uwPek5EdoeqjdWXtgCUaqvSROlz7T2WD"
        },
        "self": {
        "href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi"
        },
        "actions": {
        "href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi/actions"
        }
        }
        }

        Refund a payment

        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

          Copied!

          Request example

          1
          2
          3
          {
          "amount": 10
          }

          Response example

          1
          2
          3
          4
          5
          6
          7
          8
          {
          "action_id": "act_f544khcfnyqudh3l73qwnnvfbi",
          "_links": {
          "payment": {
          "href": "https://api.sandbox.checkout.com/payments/pay_uexsi2rik7ceppidytigjmxshi"
          }
          }
          }

          Cancel a payment

          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.


          Webhooks

          You may receive the following webhooks when using Alma. View all of our webhook notifications.

          WebhookDescription

          payment_pending

          Sent when a payment request has been successfully initiated.

          payment_expired

          Sent when a payment request has expired.

          payment_declined

          Sent when a payment request has been rejected.

          payment_captured

          Sent when the payment has been successfully captured.

          payment_refunded

          Sent when the payment has been (fully or partially) refunded.

          payment_refund_declined

          Sent when a refund has been declined.


          Testing Alma

          To start testing, you'll need to contact your Customer Success Manager or Implementation Engineer to activate Alma payments in the sandbox environment.

          1. Create an Alma transaction as above, following the redirect link in the response to Alma’s website.
          2. Enter the name and the test card details that we have provided you with.
          3. Enter the test phone numbers that we have provided you with. Confirm the message code you received on the test phone number.
          4. Select Submit. You should then be redirected to your predefined success URL.