githubEdit

Card Payments

Take card payments through the API

To use this capability, add octo/cardPayments to your Octo-Capabilities header.

This capability allows you to accept card payments via the API.

Gateway IDs returned/accepted in source are:

  • adyen

  • external

Endpoints

All paths below are under /octo.

This capability extends booking/order/gift write flows and related read flows documented in:

List routes intentionally omit cardPayment/returnUrl.

Get Card Payment

get

Returns the cached card payment payload for a previously created card payment object.

Path parameters
cardPaymentIdstringRequired

Card payment identifier returned in booking/order/gift responses.

Example: cp_20260514_42ad10
Responses
chevron-right
200

Successful response

application/json
get
/card_payments/{cardPaymentId}
200

Successful response

Validation rules from source:

  • cardPayment.source must be one of POS, ECOM, MOTO (GATEWAY_INVALID_SOURCE otherwise).

  • cardPayment.currency must match the order currency (GATEWAY_CURRENCY_MISMATCH otherwise).

  • If cardPayment.cardId is supplied it must reference a reusable card on the selected gateway (INVALID_CARD_ID otherwise).

  • If an explicit gateway is supplied and does not match the resolved gateway, source raises GATEWAY_MISMATCH.

Response Fields

All card payment request/response fields (including reusableCards[] and gateway payloads) are included on the card payment schemas in this page.

Notes:

  • adyen can return {} when amount <= 0.

  • The card payment lookup endpoint returns cached card payment JSON (up to 1 hour) and is only available when the card payment object was created with a returnUrl.

Adyen Gateway

Adyen Drop-in Integration Docs

session is null until you set a returnUrl (for ECOM payments).

When you confirm/replay payment, source accepts:

  • adyen.sessionId

  • adyen.sessionResult (optional with sessionId)

  • adyen.pspReference

  • adyen.paymentMethod

  • adyen.channel

For Adyen session creation, channel is resolved from the adyen-channel request header first, then cardPayment.adyen.channel, then defaults to Web.

Most integrations send this payload on the booking/order/gift confirm route that finalizes payment.

If Ventrata has not yet received the webhook notification from Adyen then you may receive a PAYMENT_PENDING error code. Repeat the request. If the payment is refused, you get a BAD_REQUEST error with the reason in errorMessage.

External Gateway

The external gateway lets you register a virtual card payment taken on an external processor.

external.approved defaults to true when omitted. For external payload processing, source requires at least one of notes, amount, currency, or cancel to be present.

Reusable Cards

Reusable card fields are included in the ReusableCard schema.

Schema Additions (JSON)

These are additive fragments showing only fields introduced by this capability.

Booking

BookingWriteRequest

Error

Gift

GiftCreateRequest

Order

OrderCreateRequest

OrderUpdateRequest

Last updated