v1

latestOpenAPI 3.0.02026-07-24103118224.7 KB
Customer

Create a payment method setup request for a customer

Creates a pending setup request that allows a customer to securely save a payment method. Returns a setup request id to pass as setupId to the InflowPay iframe SDK. The SDK handles card collection, tokenization, and 3DS authentication in subsequent steps. The request status advances from pending to completed (or failed) asynchronously once the card is confirmed.

post/api/customer/{customerEmail}/payment-methods

Path parameters

customerEmailstring required
Example:customer@example.com

Email address of the customer

Request body

currency'EUR' | 'USD' required

Currency for the payment method (EUR or USD). The saved payment method will be usable for charges in this currency.

threeDsSuccessUrlstring

PCI / server-to-server only — For merchants who transmit card data via their API. URL to redirect to after successful 3DS authentication.

threeDsFailureUrlstring

PCI / server-to-server only — For merchants who transmit card data via their API. URL to redirect to after failed 3DS authentication.

firstNamestring

Optional in the API schema, but required when the customer has no first name on file (e.g. new customers) or when that data is missing — 3DS cannot be started without it.

lastNamestring

Optional in the API schema, but required when the customer has no last name on file (e.g. new customers) or when that data is missing — 3DS cannot be started without it.

Example request

{
  "card": {
    "number": "4242424242424242",
    "expiration_month": 12,
    "expiration_year": 2025,
    "cvc": "123"
  }
}

Response

Setup request created successfully. Use the returned id as setupId in the iframe SDK.

idstring required

Unique ID of the setup request. Pass this as setupId to the InflowPay iframe SDK so it can connect via WebSocket and confirm the card.

customerIdstring required

ID of the customer this payment method will be attached to.

customerEmailstring required

Email of the customer.

status'pending' | 'completed' | 'failed' | 'requires_3ds' | 'cancelled' required

Current status of the setup request. Always pending on creation — the status advances to completed or failed after the card is confirmed via the SDK.

currency'EUR' | 'GBP' | 'USD' required

Currency of the payment method (EUR or USD).

Example response

{
  "id": "setup_pm_req_abc123",
  "customerId": "cus_xyz789",
  "customerEmail": "customer@example.com",
  "status": "pending",
  "currency": "EUR"
}