Payors

List of endpoints

Description Endpoint

Getting a List of all stored Payment Methods for a Payer

GET/payors/{payorId}/payment_methods

Getting the Mandate IDs for a Payment Method Token

GET/payors/{payorId}/payment_methods/{token}

Deleting a Payment Method for a Payer

DELETE/payors/{payorId}/payment_methods/{token}

About Payors

The payors resource enables you to find information about payers (also called payors). Payers are identified via their payer ID (payor_id).

Getting a List of all stored Payment Methods for a Payer

Request

The list contains all payment methods a payer saved. Payment methods in this context means cards or bank accounts that have been tokenized, for example via a Checkout Session of type tokenization.

Parameters for the Request Body

No request body is needed.

How to Resolve the Path Placeholders of the Endpoint

Replace {payorId} in the endpoint path with the actual payer ID (payor_id) of the payer.

Optional Query Parameters for Pagination

This endpoint supports pagination. If you are not providing any pagination parameters, the response is returned with default pagination settings.

Pagination parameters are added as query parameters with the request in the format

{endpoint_path}?page=2&per_page=10

GET/payors/{payorId}/payment_methods

curl https://base-url-placeholder/payors/my_payor_id/payment_methods
  -X GET
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

Parameters for pagination

payment_methods array

An array of all saved payment methods for the payer.

You can display this information to your payer for a payer wallet. Do not display the token in the payer wallet, since this is sensitive data.

Each payment method consists of:

details object

{
    "total_entries": 2,
    "total_pages": 1,
    "page": 1,
    "per_page": 10,
    "payment_methods": [
        {
            "token": "4fa8df2be0c992b0108a",
            "type": "card",
            "details": {
                "last_four_digits": "5454",
                "brand": "MASTERCARD",
                "card_classification": "credit"
            }
        },
        {
            "token": "6rw8hg6vfe7v78e9196x",
            "type": "bank_account",
            "details": {
                "last_four": "7653"
            }
        }
    ]
}

Getting the Mandate IDs for a Payment Method Token

Request

This endpoint returns all mandate IDs for a payment method token. One token can have multiple mandates if you created new mandates for a saved card.

Parameters for the Request Body

No request body is needed.

How to Resolve the Path Placeholders of the Endpoint

Exchange {payorId} and {token} in the endpoint path with the actual payer ID (payor_id) and payment method token.

GET/payors/{payorId}/payment_methods/{token}

curl https://base-url-placeholder/payors/my_payor_id/payment_methods/232301485cfa4b36bc28
  -X GET
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

You can display this information to your payer for a payer wallet. Do not display the token in the payer wallet, since this is sensitive data.

details object

mandates object

If you are displaying this information to your payer for a payer wallet, make sure to resolve the mandate ID to a user-friendly description of the payment purpose, for example "Recurring payments for tuition" or "Streaming Subscription".

{
    "token": "4fa8df2be0c992b0108a",
    "type": "card",
    "details": {
        "last_four_digits": "5454",
        "brand": "MASTERCARD",
        "card_classification": "credit"
    },
    "mandates": [
        {
            "id": "MCZER20240716W4OohpMT"
        },
        {
            "id": "MCZER20240716fp5qTXUr"
        }
    ]
}

Deleting a Payment Method for a Payer

If you delete a payment method for a payer, the following information will be deleted:

  • The token containing the payer information (also used as an identifier for the payment method).

  • The payment type and details information (for example type card payment and details about the card).

  • All mandate IDs belonging to this payment method.

Request

Parameters for the Request Body

No request body is needed.

How to Resolve the Path Placeholders of the Endpoint

Exchange {payorId} and {token} in the endpoint path with the actual payer ID (payor_id) and payment method token.

DELETE/payors/{payorId}/payment_methods/{token}

curl https://base-url-placeholder/payors/my_payor_id/payment_methods/232301485cfa4b36bc28
  -X DELETE
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

A 204 response will let you know that the payment method has been successfully deleted.

204 NO CONTENT