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

Afterpay Payments API

Afterpay (Cash App Afterpay) Global API for authorizing, capturing, voiding, and refunding buy-now-pay-later payments. HTTP Basic authenticated.

Afterpay Payments API is one of 12 APIs that Cash App publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Payments, Buy Now Pay Later, and Afterpay. The published artifact set on APIs.io includes an OpenAPI specification and an API reference.

This API exposes 11 operations across 10 paths, and defines 37 schemas. It is described by OpenAPI 3.1.0, at version 1.0.0.

Requests are made against 2 base URLs: https://global-api-sandbox.afterpay.com, https://global-api.afterpay.com.

11 operations 10 paths 37 schemas 3 GET6 POST2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
1.0.0
Base URL
https://global-api.afterpay.com
Authentication
HTTP Basic
Resource Areas
1

Authentication & Security 1

Afterpay Payments API declares 1 security scheme for authenticating requests. It accepts HTTP basic authentication (sec0).

Paths & Operations 11

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

Operations 11
GET
/v2/payments
List Payments
list-payments 12 params → 200422500
POST
/v2/payments/auth
Auth
auth 3 params body → 201402412422
POST
/v2/payments/capture
Capture Full Payment
capture-full-payment 3 params body → 201402412422
GET
/v2/payments/{orderId}
Get Payment By Order ID
get-payment-by-order-id 4 params → 200404
PUT
/v2/payments/{orderId}
Update Payment by Order ID
update-payment-by-order-id 4 params body → 201404
POST
/v2/payments/{orderId}/capture
Capture Payment
capture-payment 4 params body → 201404410412422
PUT
/v2/payments/{orderId}/courier
Update Shipping Courier
update-shipping-courier 4 params body → 200412422
POST
/v2/payments/{orderId}/refund
Create Refund
create-refund 4 params body → 201412422
POST
/v2/payments/{orderId}/void
Void
void-payment 4 params body → 201404422
GET
/v2/payments/token:{token}
Get Payment By Token
get-payment-by-token 4 params → 200404
POST
/v2/payments/token:{token}/reversal
Reverse Payment By Token
reverse-payment-by-token 4 params → 204402412

Schemas 37

The contract defines 37 schemas that model the data the API accepts and returns. The most detailed are update-payment-by-order-id_Response_201 (11 properties), PaymentAuth (11 properties), Payment (11 properties), AuthorizePayment (10 properties). Each schema is shown below with its type and property counts.

PaymentStatus
string
represents the status of the order
MoneyCurrency
string
Money
object
Object containing amount and currency
2 properties 2 required
PaymentPaymentState
string
is the current state for capturing payments
Refund
object
To guarantee safe retries, the merchant should offer their refund ID or reference, aligning with their internal records Unique values for the requestID and mer…
6 properties
Consumer
object
The consumer data model is used for gathering essential user information. It captures details such as the individual's first name, represented by givenNames, a…
4 properties 1 required
ContactCountryCode
string
Contact
object
This data model is used for storing an individual's contact information. Mandatory fields such as name, line1, area1, region, postcode, and countryCode help in…
9 properties 6 required
ShippingCourierPriority
string
Shipping-Courier
object
Essential information for tracking a shipment. The shippedAt key represents the date and time when the item was shipped. This value follows the [ISO 8601 stand…
4 properties
Item
object
This data model is used to store crucial product details. The price.amount field represents the unit price of the individual item. The quantity field shows the…
9 properties 3 required
Discount
object
Discount applied to an order
2 properties
Order-Details
object
This comprehensive schema is designed to store an entire transaction's detail, covering crucial aspects like consumer information, billing and shipping details…
7 properties
PaymentEventType
string
Payment-Event
object
Each payment event has a unique ID, creation timestamp, and type (e.g., "AUTHAPPROVED", "AUTHDECLINED"). For "AUTHAPPROVED" events, an expiration timestamp is…
6 properties
Payment
object
Describes the schema for a (read-only) payment object
11 properties
list-payments_Response_200
object
4 properties
InitiationActor
string
The party who initiated the order
Initiation
object
1 property 1 required
SubscriptionType
string
SubscriptionInterval
string
Subscription
object
3 properties
Enrichments
object
2 properties 1 required
AuthorizePayment
object
10 properties 1 required
PaymentAuthStatus
string
represents the status of the order
PaymentAuthPaymentState
string
is the current state for capturing payments
PaymentAuth
object
Describes the schema for a (read-only) payment object
11 properties
V2PaymentsOrderIdPutResponsesContentApplicationJsonSchemaOriginalAmount
object
Total amount for the order. See Money.
V2PaymentsOrderIdPutResponsesContentApplicationJsonSchemaOpenToCaptureAmount
object
Total amount that can be captured for order. See Money.
V2PaymentsOrderIdPutResponsesContentApplicationJsonSchemaRefunds
object
The refund details for merchant's order. See Refund.
V2PaymentsOrderIdPutResponsesContentApplicationJsonSchemaOrderDetails
object
The order bound to the payment. See Order Details.
V2PaymentsOrderIdPutResponsesContentApplicationJsonSchemaEvents
object
Event list for for merchant's order. See Events.
update-payment-by-order-id_Response_201
object
11 properties
CapturePayment
object
4 properties
V2PaymentsOrderIdCourierPutParametersAccept
string
CreateRefund
object
To guarantee safe retries, the merchant should offer their refund ID or reference, aligning with their internal records Unique values for the requestID and mer…
4 properties
reverse-payment-by-token_Response_204
object
Empty response body

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

cash-app-payments-openapi.json Raw ↑

Other APIs Cash App publishes across the network.

Cash App Pay Network API
Cash App Pay Customer Request API
Cash App Pay Management API
Afterpay Checkouts API
Afterpay Orders API
Afterpay Configuration API
Afterpay Disputes API
Afterpay Grants API
Add Cash App Pay to Your Site (Grants) API
Afterpay Service Status API
Afterpay Billing Agreements API (Deprecated)