Payments
OCAPI has the following payment options:
- Redirect payments
- Embedded payments
- Cinema-processed payments
Redirect payments
Redirect payments work similarly to V1/V2 Connect, but with a different set of endpoints.
(POST) /ocapi/v1/orders/{orderId}/payments/redirect
Creates a redirect payment, similar to V1/V2 Connect.
(GET) /ocapi/v1/orders/{orderId}/payments/redirect/current
Returns the redirect payment's status. Can be used to poll for payment completion. On success, Connect will create an order completion, which the client will need to confirm.
Embedded payments
Embedded payments are unique to OCAPI. They allow customers to complete their payment inside the current application, instead of being redirected to a different application or website.
(POST) /ocapi/v1/orders/{orderId}/payments/embedded
Returns a javascript bundle for the client application to render and execute. That bundle communicates with the payment service, and the payment service communicates the payment status to Connect.
(GET) /ocapi/v1/orders/{orderId}/payments/embedded/current
Returns the embedded payment's status. Can be used to poll for payment completion. On success, Connect will create an order completion, which the client will need to confirm.
Order completion
(GET) /ocapi/v1/orders/{orderId}/completion
Returns an order completion's status. Can be used to poll for order completion.
Manually completing orders
Some orders must be completed without using a payment service:
Zero value orders
Unpaid orders
Orders paid entirely by gift card.
(POST) /ocapi/v1/orders/{orderId}/completion
Manually completes an order.