Payments

The complete payment flow β€” from discovering payment options through paying for an order, managing sources, tipping, and promotions.

πŸ”’ Certified Partners only. Creating orders and processing payments through the API is restricted to certified partners. If you are not certified, use the Checkout Handoff instead β€” it needs no certification and hands the shopper to Blaze-hosted checkout with the cart intact. To apply for certification, contact your Blaze account manager or ecomsupport@blaze.me. Full list of restricted operations: Access Tiers.

What you'll learn

  • How the payment flow works end-to-end: payment options β†’ customer token β†’ source β†’ session β†’ pay
  • How payment providers are abstracted behind the {service} parameter
  • How to manage payment sources (list, add, update, delete)
  • How to create payment sessions and pay for an order
  • How tipping and payment promotions work
  • v1 vs v2 source listing differences
  • Common payment error scenarios and their error codes

Prerequisites

All payment endpoints use the jwt_authenticated pipeline β€” a valid token is required.


Payment Flow Overview

The typical payment flow follows these steps:

  1. Get payment options β€” discover which payment providers the store supports
  2. Get customer token β€” obtain a provider-specific token for the customer (provider-dependent)
  3. Create/register a customer β€” upsert the customer record in the external provider
  4. Add a payment source β€” register a payment method (card, bank account, etc.)
  5. Create a payment session β€” initialize a payment session with the provider (provider-dependent)
  6. Pay for an order β€” charge the order using the payment source

Not all steps are required for every provider. Some providers (e.g. Stronghold) need a customer token step, while others (e.g. Adyen) need a session step. The specific requirements depend on the provider.


Payment Providers

All payment endpoints use a {service} path parameter that identifies the provider. The API abstracts provider-specific logic behind a common interface.

Supported {service} values:

  • adyen β€” Adyen (card payments, 3DS)
  • aeropay β€” AeroPay (ACH/bank transfers)
  • stronghold β€” Stronghold (ACH payments)
  • moneris β€” Moneris (card payments, 3DS)
  • swifter β€” Swifter (digital payments)
  • ledgergreen β€” LedgerGreen (lending)
  • merrco β€” Merrco (card payments)
  • spence β€” Spence (digital payments)
  • greenbax β€” Greenbax (digital payments)
  • blazepay_widget β€” BlazePay Widget (embedded payment widget)

The same endpoint paths work across all providers β€” only the {service} segment changes.


Step 1: Get Payment Options

Discover which payment methods are configured for the store.

GET /api/v1/store/payment-options

curl -X GET https://ecom-api.staging.blaze.me/api/v1/store/payment-options \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c"

This endpoint uses the jwt_optional_authenticated pipeline β€” no token is strictly required. It returns the list of payment options enabled for the store, including which external services are available.


Step 2: Get Payment Customer Token

Some providers require a customer-specific token before adding sources or making payments.

GET /api/v1/store/payments/{service}/token

Auth: jwt_authenticated

cURL

curl -X GET https://ecom-api.staging.blaze.me/api/v1/store/payments/stronghold/token \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

{
  "data": {
    "id": null,
    "type": "payments_token",
    "attributes": {
      "mfa": false,
      "token": "pay_tok_abc123def456...",
      "expiry": "2026-06-01T00:00:00Z"
    }
  }
}

Error codes

  • bad_request (400) β€” Invalid payment option. Returned when {service} is not a recognized provider.
  • payment_customer_not_found (400) β€” The user does not have a customer record with this provider yet.

Step 3: Create / Register Payment Customer

Register or update the user's customer record with an external payment provider. This links the cart to the provider so the payment can be processed.

PUT /api/v1/store/payments/{service}/customers

Auth: jwt_authenticated

cURL

curl -X PUT https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/customers \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "type": "payment_customers",
      "id": "",
      "attributes": {},
      "relationships": {
        "cart": {
          "data": {
            "type": "carts",
            "id": "CART_UUID"
          }
        }
      }
    }
  }'

JavaScript (fetch)

const STORE_UUID = "e87437f2-3e35-4738-af5e-6307e368255c";
const BASE_URL = "https://ecom-api.staging.blaze.me";

const response = await fetch(
  `${BASE_URL}/api/v1/store/payments/adyen/customers`,
  {
    method: "PUT",
    headers: {
      "Content-Type": "application/vnd.api+json",
      Accept: "application/vnd.api+json",
      "X-Store": STORE_UUID,
      Authorization: `Bearer ${token}`,
    },
    body: JSON.stringify({
      data: {
        type: "payment_customers",
        id: "",
        attributes: {},
        relationships: {
          cart: {
            data: { type: "carts", id: cartId },
          },
        },
      },
    }),
  },
);

const { data } = await response.json();
console.log(`Customer registered: ${data.id}`);

Response

{
  "data": {
    "id": "customer-uuid",
    "type": "payment_customers",
    "attributes": {
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com",
      "phone_number": "+15551234567",
      "external_service": "adyen",
      "external_id": "ext_cust_abc123",
      "is_confirmed": true,
      "extra_content": null
    }
  }
}

Error codes

  • bad_request (400) β€” Invalid payment option. Returned when {service} is not recognized.
  • no_match_for_payment_customer (400) β€” Customer does not match the one from the external payment source data.
  • cart_data_required_for_customer (400) β€” Additional shopping cart data is required for this payment processor. Returned when the cart relationship is missing and the provider requires it.

Step 4: Manage Payment Sources

Payment sources represent saved payment methods (credit cards, bank accounts, etc.).

List Sources (v1)

GET /api/v1/store/payments/{service}/sources

Returns sources for a specific provider.

Auth: jwt_authenticated

cURL

curl -X GET https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/sources \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN"

JavaScript (fetch)

const response = await fetch(
  `${BASE_URL}/api/v1/store/payments/adyen/sources`,
  {
    headers: {
      "Content-Type": "application/vnd.api+json",
      Accept: "application/vnd.api+json",
      "X-Store": STORE_UUID,
      Authorization: `Bearer ${token}`,
    },
  },
);

const { data } = await response.json();
console.log(`Found ${Array.isArray(data) ? data.length : 1} source(s)`);

Response

{
  "data": [
    {
      "id": "source-uuid",
      "type": "payment_sources",
      "attributes": {
        "label": "Visa",
        "label_display": "Visa β€’β€’β€’β€’ 4242",
        "active": true,
        "external_service": "adyen",
        "external_id": "ext_src_abc123",
        "type": "credit_card",
        "provider": "visa",
        "provider_display": "Visa",
        "mask": "4242",
        "account_type": null,
        "is_default": true,
        "expiry_date": "12/2027",
        "cardholder_name": "Jane Doe",
        "is_expired": false
      }
    }
  ]
}

List Sources (v2) β€” All Providers

GET /api/v2/store/payments/sources

Returns sources grouped by provider in a single request. No {service} parameter needed.

Auth: jwt_authenticated

curl -X GET https://ecom-api.staging.blaze.me/api/v2/store/payments/sources \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

{
  "data": {
    "id": "all_payment_sources",
    "type": "all_payment_sources",
    "attributes": {
      "adyen": [
        {
          "id": "source-uuid",
          "label": "Visa",
          "label_display": "Visa β€’β€’β€’β€’ 4242",
          "active": true,
          "external_service": "adyen",
          "type": "credit_card",
          "mask": "4242",
          "is_default": true,
          "is_expired": false
        }
      ],
      "stronghold": []
    }
  }
}

Tip: Use v2 when you need to show all saved payment methods across providers. Use v1 when working with a single provider.


Add a Payment Source

POST /api/v1/store/payments/{service}/sources

Auth: jwt_authenticated

The exact attributes required vary by provider. Common fields include token, external_id, type, and is_default.

cURL

curl -X POST https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/sources \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "type": "payment_sources",
      "attributes": {
        "token": "tok_abc123...",
        "type": "credit_card",
        "is_default": true
      }
    }
  }'

JavaScript (fetch)

const response = await fetch(
  `${BASE_URL}/api/v1/store/payments/adyen/sources`,
  {
    method: "POST",
    headers: {
      "Content-Type": "application/vnd.api+json",
      Accept: "application/vnd.api+json",
      "X-Store": STORE_UUID,
      Authorization: `Bearer ${token}`,
    },
    body: JSON.stringify({
      data: {
        type: "payment_sources",
        attributes: {
          token: "tok_abc123...",
          type: "credit_card",
          is_default: true,
        },
      },
    }),
  },
);

const { data } = await response.json();
console.log(`Source added: ${data.id}`);

Response

{
  "data": {
    "id": "source-uuid",
    "type": "payment_sources",
    "attributes": {
      "label": "Visa",
      "label_display": "Visa β€’β€’β€’β€’ 4242",
      "active": true,
      "external_service": "adyen",
      "external_id": "ext_src_abc123",
      "type": "credit_card",
      "provider": "visa",
      "provider_display": "Visa",
      "mask": "4242",
      "account_type": null,
      "is_default": true,
      "expiry_date": "12/2027",
      "cardholder_name": "Jane Doe",
      "is_expired": false
    }
  }
}

Error codes

  • bad_request (400) β€” Invalid payment option. The {service} value is not recognized.
  • invalid_payment_source (400) β€” Some required fields are missing for adding the payment source. Check the provider-specific requirements.
  • guest_cannot_add_source (400) β€” Cannot add sources in guest checkout. The user must be authenticated.
  • expired_payment_token (400) β€” The payment card has expired. The token provided refers to an expired card.
  • invalid_payment_token (400) β€” The payment card is invalid. The token could not be validated by the provider.

Update a Payment Source

PATCH /api/v1/store/payments/{service}/sources/{id}

Used to update source properties, such as marking a source as the default.

Auth: jwt_authenticated

curl -X PATCH https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/sources/SOURCE_ID \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "id": "SOURCE_ID",
      "type": "payment_sources",
      "attributes": {
        "is_default": true
      }
    }
  }'

Error codes

  • payment_source_not_found (400) β€” The source ID does not match any source for this user and service.

Delete a Payment Source

DELETE /api/v1/store/payments/{service}/sources/{id}

Auth: jwt_authenticated

curl -X DELETE https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/sources/SOURCE_ID \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN"

Error codes

  • bad_request (400) β€” Invalid payment option.
  • payment_source_not_found (400) β€” The source does not exist for this user and provider.

Step 5: Create a Payment Session

Some providers (e.g. blazepay_widget, adyen) require creating a payment session before charging. The session ties together the store, cart, and user in the external provider.

POST /api/v1/store/payments/{service}/sessions

Auth: jwt_optional_authenticated β€” for guest checkout, pass user details in the attributes instead.

curl -X POST https://ecom-api.staging.blaze.me/api/v1/store/payments/blazepay_widget/sessions \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "type": "payment_sessions",
      "attributes": {},
      "relationships": {
        "cart": {
          "data": {
            "type": "carts",
            "id": "CART_UUID"
          }
        }
      }
    }
  }'

For guest checkout (no JWT), include user details in attributes:

{
  "data": {
    "type": "payment_sessions",
    "attributes": {
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com",
      "phone_number": "+15551234567"
    },
    "relationships": {
      "cart": {
        "data": { "type": "carts", "id": "CART_UUID" }
      }
    }
  }
}

Response (201 Created)

{
  "data": {
    "id": "session-uuid",
    "type": "payment_session",
    "attributes": {
      "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    }
  }
}

Error codes

  • bad_request (400) β€” Invalid payment option or invalid request parameters.
  • not_found_payment_config (404) β€” Payment configuration was not found for the store. The provider is not configured.
  • not_found (404) β€” The cart UUID does not match any existing cart.

Step 6: Pay for an Order

After the order is created (via the Cart & Checkout flow), charge it using the payment source.

POST /api/v1/store/payments/{service}/orders/{uuid}/pay

Auth: jwt_authenticated

cURL

curl -X POST https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/orders/ORDER_UUID/pay \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "type": "payments_charge",
      "attributes": {
        "source_id": "SOURCE_UUID",
        "postal_code": "90210"
      }
    }
  }'

JavaScript (fetch)

const response = await fetch(
  `${BASE_URL}/api/v1/store/payments/adyen/orders/${orderUuid}/pay`,
  {
    method: "POST",
    headers: {
      "Content-Type": "application/vnd.api+json",
      Accept: "application/vnd.api+json",
      "X-Store": STORE_UUID,
      Authorization: `Bearer ${token}`,
    },
    body: JSON.stringify({
      data: {
        type: "payments_charge",
        attributes: {
          source_id: sourceId,
          postal_code: "90210",
        },
      },
    }),
  },
);

const result = await response.json();
if (response.ok) {
  console.log(`Payment status: ${result.data.attributes.status}`);
} else {
  console.error("Payment failed:", result.errors);
}

The attributes vary by provider, but common fields include:

  • source_id β€” UUID of the payment source to charge
  • postal_code β€” billing postal code (required by some providers)
  • payment_session_id β€” session ID from the session creation step (for providers that use sessions)
  • payment_session_payment_id β€” external payment ID from the provider widget

Response

{
  "data": {
    "id": "charge-uuid",
    "type": "payment_charges",
    "attributes": {
      "status": "authorized",
      "type": "charge",
      "fee": { "amount": 0, "currency": "USD" },
      "convenience_fee": { "amount": 0, "currency": "USD" },
      "amount_without_convenience_fee": { "amount": 4928, "currency": "USD" },
      "description": null,
      "external_id": "ext_charge_abc123",
      "external_service": "adyen",
      "amount": { "amount": 4928, "currency": "USD" },
      "external_url": null,
      "created_at": "2026-05-30T20:00:00Z",
      "authorized_at": "2026-05-30T20:00:01Z",
      "captured_at": null,
      "updated_at": "2026-05-30T20:00:01Z",
      "guest_payment_source": null,
      "is_3ds_authenticated": false,
      "service_external_id": null,
      "service_external_url": null,
      "credit": null
    },
    "relationships": {
      "payment_customer": {
        "data": { "id": "customer-uuid", "type": "payment_customers" }
      },
      "payment_source": {
        "data": { "id": "source-uuid", "type": "payment_sources" }
      },
      "payment_tip": { "data": null }
    }
  },
  "included": [
    {
      "id": "customer-uuid",
      "type": "payment_customers",
      "attributes": {
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane@example.com",
        "external_service": "adyen",
        "external_id": "ext_cust_abc123"
      }
    },
    {
      "id": "source-uuid",
      "type": "payment_sources",
      "attributes": {
        "label": "Visa",
        "mask": "4242",
        "is_default": true,
        "is_expired": false
      }
    }
  ]
}

Charge statuses:

  • authorized β€” payment authorized, pending capture
  • captured β€” payment captured (funds collected)
  • failed β€” payment failed

Error codes

  • order_already_paid (400) β€” This order has already been paid.
  • order_user_mismatch (400) β€” The order belongs to another user. The JWT user must match the order owner.
  • payment_failed (400) β€” Payment authorization failed. The provider declined the charge. The error detail may include a provider-specific message.
  • charge_not_authorized (400) β€” Payment not yet authorized. Occurs when trying to capture a payment that hasn't been authorized.
  • charge_canceled (400) β€” Payment canceled by the provider.
  • missing_payment_source (400) β€” Online payment requires a payment source. The source_id is missing or invalid.
  • missing_payment_source_identifier (400) β€” Online payment requires a payment source ID or token.
  • expired_payment_token (400) β€” Online payment card has expired.
  • invalid_payment_token (400) β€” Online payment card is invalid.
  • payment_source_not_found (400) β€” Online payment source not found.
  • missing_payment_postal_code (400) β€” Online payment requires a postal code (provider-dependent).
  • missing_payment_cres (400) β€” Invalid challenge result (cres). Occurs during 3DS authentication flow.
  • missing_payment_cavv (400) β€” Can't authenticate cardholder. 3DS verification failed.
  • missing_cardholder_name (400) β€” Missing cardholder name.
  • missing_billing_address (400) β€” Billing address is required (provider-dependent).
  • not_found (404) β€” Order not found for the given UUID.

Step 7: External Auth (3DS)

Some providers (e.g. Adyen, Moneris) require 3D Secure authentication. This endpoint handles the challenge/response flow.

POST /api/v1/store/payments/{service}/sources/external-auth

Auth: jwt_optional_authenticated

curl -X POST https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/sources/external-auth \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "type": "payment_external_auth",
      "id": "",
      "attributes": {
        "challenge_screen_width": 600,
        "challenge_screen_height": 400
      },
      "relationships": {
        "cart": {
          "data": {
            "type": "carts",
            "id": "CART_UUID"
          }
        }
      }
    }
  }'

For existing sources, use the path with source ID:

POST /api/v1/store/payments/{service}/sources/{source_id}/external-auth

This variant attaches the auth verification to a specific existing payment source.


Tipping

Add a tip to a paid order. Tips are processed through the same payment provider.

POST /api/v1/store/payments/{service}/tip

Auth: jwt_authenticated

curl -X POST https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/tip \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "type": "payment_sources",
      "attributes": {
        "external_id": "charge-external-id",
        "percentage": 15
      }
    }
  }'

Response

{
  "data": {
    "id": "tip-uuid",
    "type": "payment_tips",
    "attributes": {
      "status": "captured",
      "beneficiary_name": "Store Name",
      "fee": { "amount": 0, "currency": "USD" },
      "amount": { "amount": 740, "currency": "USD" },
      "external_id": "ext_tip_abc123",
      "external_service": "adyen",
      "created_at": "2026-05-30T20:05:00Z",
      "authorized_at": "2026-05-30T20:05:00Z",
      "captured_at": "2026-05-30T20:05:01Z",
      "percentage": 15
    },
    "relationships": {
      "payment_source": {
        "data": { "id": "source-uuid", "type": "payment_sources" }
      }
    }
  }
}

Error codes

  • tips_not_allowed (400) β€” Tips are not allowed for the selected payment option.
  • already_tipped (400) β€” Tip already processed. Each order can only be tipped once.
  • bad_request (400) β€” Invalid payment option.

Payment Promotions

Some payment providers offer their own promotional discounts (e.g., "Save $5 when you pay with Aeropay").

List Promotions

GET /api/v1/store/payments/{service}/promotions

Auth: jwt_authenticated

Supports pagination with limit and offset query parameters.

curl -X GET "https://ecom-api.staging.blaze.me/api/v1/store/payments/aeropay/promotions?limit=10&offset=0" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

{
  "data": [
    {
      "id": "promo-external-id",
      "type": "payment_promotions",
      "attributes": {
        "name": "Save $5 with AeroPay",
        "title": "Save $5 with AeroPay",
        "description": "You'll save $5 in this payment. Valid until Jun 30, 2026, 11:59 PM",
        "start_date": "2026-01-01T00:00:00Z",
        "end_date": "2026-06-30T23:59:59Z",
        "promotion_type": "discount",
        "benefit_type": "fixed",
        "immediate_use": true,
        "fixed_amount": { "amount": 500, "currency": "USD" },
        "first_purchase_only": false,
        "single_use": false,
        "min_charge_amount": null,
        "disabled_on": null,
        "savings": { "amount": 500, "currency": "USD" },
        "savings_display": "You're saving $5 OFF with Aeropay"
      }
    }
  ]
}

Error codes

  • promotions_not_allowed (400) β€” Promotions are not allowed for the selected payment option. The store's payment option has allows_promotions disabled.
  • bad_request (400) β€” Invalid payment option.
  • payment_option_not_found (400) β€” The payment option for this service was not found in the store configuration.

Check Redeemable Promotions

Check which promotions can be redeemed for a given charge amount.

POST /api/v1/store/payments/{service}/promotions/redeemable

Auth: jwt_authenticated

curl -X POST https://ecom-api.staging.blaze.me/api/v1/store/payments/aeropay/promotions/redeemable \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "type": "payment_redeemable_promotions",
      "id": "",
      "attributes": {
        "charge_amount": 4928
      }
    }
  }'

Returns the same promotion format as the list endpoint, filtered to promotions that are redeemable for the specified amount.


Order Payment Charges

View the payment charges associated with an order.

GET /api/v1/store/orders/{uuid}/payment/charges

Auth: jwt_authenticated

curl -X GET https://ecom-api.staging.blaze.me/api/v1/store/orders/ORDER_UUID/payment/charges \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c" \
  -H "Authorization: Bearer YOUR_TOKEN"

Returns a list of payment_charges for the order, including the related customer, source, and tip.


Payment Configuration

Get the provider configuration for the store. This returns settings like supported card types, fee structures, etc.

GET /api/v1/store/payments/{service}/configuration

Auth: jwt_optional_authenticated

curl -X GET https://ecom-api.staging.blaze.me/api/v1/store/payments/adyen/configuration \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -H "X-Store: e87437f2-3e35-4738-af5e-6307e368255c"

GET /api/v1/store/integrations/payments/{service}/configuration

Alternative path β€” returns the same data. This is the integrations-namespaced version.


Common Error Scenarios

All payment errors follow the standard JSON error format:

{
  "errors": [
    {
      "code": "error_code",
      "status": "400",
      "detail": "Human-readable error message",
      "source": { "pointer": "/data/attributes/field_name" }
    }
  ]
}

Payment Processing Errors

  • payment_failed (400) β€” Payment authorization or capture failed. The detail field may include a provider-specific reason.
  • charge_not_authorized (400) β€” Payment not yet authorized. Attempting an operation that requires prior authorization.
  • charge_canceled (400) β€” Payment canceled by the provider.
  • order_already_paid (400) β€” The order has already been paid. Cannot charge the same order twice.
  • order_already_completed (400) β€” The order has already been completed.

Source & Token Errors

  • missing_payment_source (400) β€” No payment source provided for an online payment.
  • missing_payment_source_identifier (400) β€” Neither a source ID nor a token was provided.
  • payment_source_not_found (400) β€” The referenced payment source does not exist.
  • invalid_payment_source (400) β€” Required fields are missing for adding a payment source.
  • expired_payment_token (400) β€” The payment card has expired.
  • invalid_payment_token (400) β€” The payment card is invalid.
  • guest_cannot_add_source (400) β€” Cannot add payment sources during guest checkout.
  • multiple_bank_accounts (400) β€” Only a single active bank account is supported.

Authentication & Authorization Errors

  • missing_payment_postal_code (400) β€” Online payment requires a postal code.
  • missing_payment_cres (400) β€” Invalid 3DS challenge result.
  • missing_payment_cavv (400) β€” Cannot authenticate cardholder (3DS failure).
  • missing_cardholder_name (400) β€” Missing cardholder name.
  • missing_billing_address (400) β€” Billing address is required.
  • missing_customer_signature (400) β€” Missing customer signature (provider-specific).
  • missing_customer_auth_key (400) β€” Missing customer auth key (provider-specific).

Configuration Errors

  • not_found_payment_config (404) β€” Payment configuration not found for the store.
  • invalid_payment_config (400) β€” External payment configuration is invalid.
  • inactive_service_config (400) β€” The provider configuration is inactive.
  • missing_service_config (400) β€” The provider configuration is missing.
  • no_payment_method_available (400) β€” No payment method available for this store.

Order Errors

  • order_user_mismatch (400) β€” The order belongs to a different user than the authenticated one.

Complete Payment Flow Example

Here's the typical end-to-end sequence:

  1. Get payment options β†’ GET /api/v1/store/payment-options
  2. Register customer β†’ PUT /api/v1/store/payments/{service}/customers (with cart relationship)
  3. Get customer token β†’ GET /api/v1/store/payments/{service}/token (if provider requires it)
  4. Add payment source β†’ POST /api/v1/store/payments/{service}/sources
  5. Create payment session β†’ POST /api/v1/store/payments/{service}/sessions (if provider requires it)
  6. Handle 3DS β†’ POST /api/v1/store/payments/{service}/sources/external-auth (if required)
  7. Pay for order β†’ POST /api/v1/store/payments/{service}/orders/{uuid}/pay
  8. Add tip β†’ POST /api/v1/store/payments/{service}/tip (optional)
  9. View charges β†’ GET /api/v1/store/orders/{uuid}/payment/charges

What's Next?

For request/response format details, see the General Concepts guide.