Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Elastic Path Payments API

When you [checkout](/docs/api/carts/checkout) a [cart](/docs/api/carts/cart-management), an unpaid [order](/docs/api/carts/orders) is returned. You can process the payment for the order though a payment gateway.:::note- You need to configure and enable a payment gateway before you can accept payments for orders.- Configure your store to use [Manual Gateway](/docs/api/payments/update-manual-gateway) to process payments if the order total is zero or the payment is through non-supported payment providers.- There are a number of actions that happen to your inventory when checking out and paying for an order. For more information, see [Inventory](/docs/api/pxm/inventory/inventories-introduction).- We recommend to wait until the payment confirmation process is fully completed before proceeding with any additional updates to the order. Making simultaneous updates to the same entity immediately after payment confirmation can lead to a race condition. To learn more information on handling parallel calls to API objects, see [Parallel Calls to API Objects](/guides/Getting-Started/api-contract#parallel-calls-to-api-objects).:::### Payment MethodsDepending on the chosen gateway, you may or may not have access to capture funds immediately or authorize for later payment.To make a partial payment in Postman through any payment gateway, specify the desired payment amount in the amount field within the request body. To learn about Split Payments, see the [Split Payments](/docs/api/payments/payment-gateways-introduction#split-payments) section.#### PurchaseThe simplest method is purchase. The gateway attempts to charge the customer immediately, and the result of the attempt is returned.You can partially pay funds using purchase method. The gateway attempts to charge the customer immediately, and the payment status for an order shows `partially_paid`.When you Get an order, you can see the following fields in the `meta` object:- `balance_owing`: Specifies the outstanding funds required to complete an order. It considers all complete or pending transactions, including authorized, paid, and captured transactions. (`balance_owing` = order total - `authorized` amount - `paid` amount).- `paid`: Specifies the total amount of purchased or captured transactions.- `authorized`: Specifies the total amount of completed or pending authorized transactions for an order.#### AuthorizeYou can `authorize` a payment so funds can later be captured when an item is dispatched or restocked.You can partially pay for an order using `authorize` payment method so that the order is `partially_authorized`. The transaction must be complete for the order status to be `partially_authorized`.For more information about order and payment statuses for split payments, see [Split Payments](/docs/api/payments/payment-gateways-introduction#split-payments).#### CaptureAfter authorizing a transaction, you have to capture the authorized funds.:::noteWe recommend capturing payments several hours to days after the authorization to mitigate risks of fraud and chargebacks. When you sell digital goods that are delivered immediately, we recommend using a single purchase call instead of separate authorize and capture calls.:::After the payment is `partially_authorized`, you must `capture` the authorized transaction later. Once you capture the authorized transactions, the order payment status will change to `partially_paid`.#### RefundsYou can use either the Refund through Composable Commerce or use the Mark as Refunded capability, or a combination of both capabilities.For more information about refund for split payments, see [Refund a Payment](/docs/api/carts/refund-a-transaction).#### Refund through Composable CommerceYou can start a full or partial refund to a supported payment provider directly from Commerce Manager or the API. When you start the refund process, the refund request is sent to the payment gateway. You no longer have to log on to your payment gateway's console to process the refund.When you process a refund, use the refund endpoint to pass the refund amount. If you don't pass an amount, the refund is processed as Mark as refunded. For more information, see the Mark as Refunded section.Each time a partial refund is triggered, the transaction.updated event is generated and updated with refunded.amount. The `order.updated` event is also triggered. The `order.refunded` event generates when the full amount is refunded.#### Mark as RefundedYou can use your payment gateway's console to process a refund. Process the refund first in the payment gateway and then use the **Mark as Refunded** capability in Composable Commerce to complete the process.When an order is **Marked as refunded**, the payment status `order.payment.status` is set to `refunded`. In this case, the `order.updated`, `transaction.updated` and `order.refunded` events are generated.

Elastic Path Payments API is one of 100 APIs that Elastic Path publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Payments. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 8 operations across 8 paths, and defines 39 schemas. It is described by OpenAPI 3.1.0, at version 25.1126.6886238.

Requests are made against 2 base URLs: https://useast.api.elasticpath.com, https://euwest.api.elasticpath.com.

8 operations 8 paths 39 schemas 2 GET6 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
25.1126.6886238
Base URL
https://useast.api.elasticpath.com
Authentication
HTTP Bearer
License
Resource Areas
1

Authentication & Security 1

Elastic Path Payments API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (BearerToken). By default, every request must be authenticated.

Paths & Operations 8

Across 8 paths, the API surfaces 8 operations — 2 GET, 6 POST. Each is listed below with its method, path, parameters, and response codes.

Payments 8

When you [checkout](/docs/api/carts/checkout) a [cart](/docs/api/carts/cart-management), an unpaid [order](/docs/api/carts/orders) is returned. You can process the payment for the…

POST
/v2/carts/{cartID}/payments
Create Stripe Payment Intent for a Cart
createCartPaymentIntent 1 param body → 201
POST
/v2/orders/{orderID}/payments
Payments
paymentSetup 1 param body → 200400409422
POST
/v2/orders/{orderID}/transactions/{transactionID}/confirm
Confirm Payment
confirmPayment 2 params body → 200400
POST
/v2/orders/{orderID}/transactions/{transactionID}/capture
Capture a Transaction
captureATransaction 2 params body → 200400
POST
/v2/orders/{orderID}/transactions/{transactionID}/refund
Refund a Transaction
refundATransaction 2 params body → 200400422
GET
/v2/orders/{orderID}/transactions
Get Order Transactions
getOrderTransactions 1 param → 200400
GET
/v2/orders/{orderID}/transactions/{transactionID}
Get a Transaction
getATransaction 2 params → 200
POST
/v2/orders/{orderID}/transactions/{transactionID}/cancel
Cancel a Transaction
cancelATransaction 2 params body → 200400

Schemas 39

The contract defines 39 schemas that model the data the API accepts and returns. The most detailed are TransactionResponse (20 properties), BaseCartResponse (13 properties), CondensedPromotionResponse (9 properties), CustomDiscountResponse (8 properties). Each schema is shown below with its type and property counts.

TransactionListResponse
object
1 property 1 required
CustomDiscountResponse
object
8 properties
CartResponse
Data.PaymentObject
FormattedPriceData
object
3 properties
Response.ErrorItem
object
5 properties 2 required
Timestamps
object
2 properties
ElasticPathPaymentsPoweredByStripePayment
object
1 property
Data.StripePaymentIntentsPayment
1 required
CondensedPromotionResponse
object
9 properties
TransactionResponse
object
20 properties
CartContact
object
1 property
BaseCartResponse
object
13 properties
CartEntityResponse
object
4 properties
RelationshipItem
object
Relationship data entry
2 properties 2 required
CartTimestamps
object
3 properties
Data.CyberSourcePayment
2 required
Data.CardConnectPayment
2 required
FailureDetails
object
Non-PII payment failure information from the payment gateway. Only present on failed transactions where the gateway provided structured failure details.
2 properties
OrdersTransactionsCancelRequest
object
1 property
Data.BasePayments
object
3 properties 2 required
OrdersTransactionsRefundRequest
object
1 property
OrdersTransactionsConfirmRequest
object
1 property
Data.BraintreePayment
2 required
Data.AuthorizeNetPayment
2 required
Data.AdyenPayment
2 required
DiscountSettings
object
2 properties
OrdersTransactionsCaptureRequest
object
1 property
TransactionEntityResponse
object
1 property 1 required
Response.ErrorResponse
object
1 property 1 required
PaymentsRequest
object
1 property
Data.PayPalExpressCheckoutPayment
1 required
CustomAttributes
object
Specifies custom attributes for cart or order objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute valu…
ItemSettings
object
1 property
Data.ManualPayment
1 required
Response.Data
object
1 property
InventorySettings
object
1 property
RelationshipArray
object
Array of relationships
1 property
Data.StripePayment
1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

elastic-path-payments-api-openapi.yml Raw ↑

Other APIs Elastic Path publishes across the network.

Elastic Path GraphQL API
Elastic Path Account Addresses API
Elastic Path Account Authentication Settings API
Elastic Path Account Cart Associations API
Elastic Path Account Management Authentication API
Elastic Path Account Members API
Elastic Path Account Membership API
Elastic Path Account Membership Settings API
Elastic Path Account Tags API
Elastic Path Accounts API
Elastic Path Administrator Latest Releases Catalog API API
Elastic Path Application Keys API