Payment API reference
The checkout module provides REST and GraphQL APIs to configure out-of-process payment methods.
REST
For more information on the available endpoints, refer to payment API usage.
The raw Payment GraphQL schema is available here.
Route URL | Method | Description |
---|---|---|
GET | Retrieve an out-of-process payment method by its code. | |
GET | List all available out-of-process payment methods. | |
POST | Create or update an out-of-process payment method. |
GraphQL
The Payment module's GraphQL schema for this is defined in etc/schema.graphqls
.
You can access details about out-of-process payment types by specifying the oope_payment_method_config
field within the available_payment_methods
or selected_payment_method
field of the cart API.
The raw Payment GraphQL schema is available here.
For more information on extending the out-of-process GraphQL schema, refer to the EDS Integration Guide.
Example query
Example response
Copied to your clipboardquery getCart($cartId: String!) {cart(cart_id: $cartId) {...CHECKOUT_DATA_FRAGMENT}}fragment CHECKOUT_DATA_FRAGMENT on Cart {idavailable_payment_methods {codetitleoope_payment_method_config {backend_integration_urlcustom_config {... on CustomConfigKeyValue {keyvalue}}}}selected_payment_method {codetitleoope_payment_method_config {backend_integration_urlcustom_config {... on CustomConfigKeyValue {keyvalue}}}}}
Copied to your clipboard{"available_payment_methods": [{"code": "checkmo","title": "Check / Money order","oope_payment_method_config": null},{"code": "oope_adyen","title": "OOPE Adyen","oope_payment_method_config": {"backend_integration_url": "http://oope-payment-method.pay/event","custom_config": [{"key": "can_refund","value": "true"}]}}],"selected_payment_method": {"code": "checkmo","title": "Check / Money order","oope_payment_method_config": null}}