Skip to main content
One-off payments are the simplest type. They are often referred to as guest payments. You only need a customer ready to interact, an amount, and a currency.

Request

Find the API documentation for the request here.
POST /payments/one-off
The payload for the request is very straightforward and in the simplest case looks like this:
{
  "amount": 1000,
  "currency_code": "EUR",
  "reference": "Order #12345",
  "source": { "type": "checkout" }
}

Remarks

  • Commerce encodes amounts in minor units of the respective currency. The example above would be 10.00 EUR.
  • The source.type denotes that the payment will be initiated fully on the front-end, and the card details need to be entered there.

Response

Commerce responds with a HTTP 200 OK and a JSON payload. The payload contains the session ID to handle the action requirement:
{
  "id": "54ba1fdb-7e4e-402b-aebb-66f9d5345cf8",
  "amount": { "requested": 1000 },
  "action_requirement": {
    "type": "use_sdk",
    "session_id": "d5b8e449-13da-4594-bf00-643146fb35d1"
  },
  "created_at": "2023-10-10T00:00:00Z",
  "currency_code": "EUR",
  "reference": "Order #12345",
  "status": "processing",
  "use_case": "ONE_OFF"
}