openapi: 3.2.0
info:
title: Network Payments API
version: 1.0.0
servers:
- url: https://api.cash.app/network/v1
description: Production
- url: https://sandbox.api.cash.app/network/v1
description: Sandbox
tags:
- name: payments
paths:
/payments:
get:
operationId: list-payments
summary: List payments
description: 'Returns a list of payments matching the given query parameters.
**This endpoint is rate limited to 100 QPS.**
Scopes: `PAYMENTS_READ`'
tags:
- payments
parameters:
- name: cursor
in: query
description: A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query.
required: false
schema:
type: string
- name: reference_id
in: query
description: Filters results to only include payments with a `reference_id` matching the given value.
required: false
schema:
type: string
- name: customer_id
in: query
description: Filters results to only include payments made by a customer that matches the the given ID.
required: false
schema:
type: string
- name: merchant_id
in: query
description: Filters results to only include payments made to a merchant that matches the the given ID.
required: false
schema:
type: string
- name: limit
in: query
description: Maximum number of payments to return.
required: false
schema:
type: integer
default: 50
- name: Accept
in: header
required: true
schema:
type: string
- name: X-Region
in: header
required: true
schema:
type: string
- name: X-Signature
in: header
required: true
schema:
type: string
- name: User-Agent
in: header
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Payments_list-payments_Response_200'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
operationId: create-payment
summary: Create payment
description: "Creates a payment from a customer to a merchant.\n\n\n\n Creating a payment requires a grant that is associated with the `ON_FILE_PAYMENT` or `ONE_TIME_PAYMENT` actions. To generate a grant, use the Customer Request API.\n\n\n**This endpoint is not rate limited.**\n\nScopes: `PAYMENTS_WRITE`"
tags:
- payments
parameters:
- name: Accept
in: header
required: true
schema:
type: string
- name: X-Region
in: header
required: true
schema:
type: string
- name: X-Signature
in: header
required: true
schema:
type: string
- name: User-Agent
in: header
required: true
schema:
type: string
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Payments_create-payment_Response_201'
'400':
description: "Bad Request\n\nIf a `PAYMENT_DECLINE_*` error is returned, the payment will still be created, but with a `DECLINED` status. This payment will then appear in the response payload.\n\n \n**`PAYMENT_DECLINE_*` errors consume one-time use grants.**\n This means you must repeat the Customer Request flow to get a new grant if you want to try taking the payment again. All other errors will not consume grants.\n"
content:
application/json:
schema:
$ref: '#/components/schemas/Create-paymentRequestBadRequestError'
requestBody:
description: ''
content:
application/json:
schema:
type: object
properties:
idempotency_key:
$ref: '#/components/schemas/IdempotencyKey'
payment:
$ref: '#/components/schemas/PaymentsPostRequestBodyContentApplicationJsonSchemaPayment'
description: Data about the payment to create.
required:
- idempotency_key
- payment
/payments/{payment_id}:
get:
operationId: retrieve-payment
summary: Retrieve payment
description: 'Retrieves a payment by its ID.
**This endpoint is not rate limited.**
Scopes: `PAYMENTS_READ`'
tags:
- payments
parameters:
- name: payment_id
in: path
required: true
schema:
type: string
- name: Accept
in: header
required: true
schema:
type: string
- name: X-Region
in: header
required: true
schema:
type: string
- name: X-Signature
in: header
required: true
schema:
type: string
- name: User-Agent
in: header
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Payments_retrieve-payment_Response_200'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Retrieve-paymentRequestNotFoundError'
/payments/{payment_id}/authorizations:
post:
operationId: create-payment-authorization
summary: Create incremental authorization
description: "Creates an authorization update for a payment. The authorization amount must be greater than or equal to the current authorized amount.\n\nUse this endpoint for incremental authorization instead of overcapturing using the Capture payment endpoint. By creating additional payment authorizations exceeding the current authorized amount, you can request additional funds without risking the original amount being declined.\n\n**This endpoint is not rate limited.** \n\nScopes: `PAYMENTS_WRITE`"
tags:
- payments
parameters:
- name: payment_id
in: path
required: true
schema:
type: string
- name: Accept
in: header
required: true
schema:
type: string
- name: X-Region
in: header
required: true
schema:
type: string
- name: X-Signature
in: header
required: true
schema:
type: string
- name: User-Agent
in: header
required: true
schema:
type: string
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Payments_create-payment-authorization_Response_201'
'400':
description: 'Bad Request
If a AUTHORIZATION_DECLINE_* error is returned, the authorization will still be created, but with a DECLINED status. This authorization will then appear in the response payload.'
content:
application/json:
schema:
$ref: '#/components/schemas/Create-payment-authorizationRequestBadRequestError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
idempotency_key:
$ref: '#/components/schemas/IdempotencyKey'
authorization:
$ref: '#/components/schemas/PaymentsPaymentIdAuthorizationsPostRequestBodyContentApplicationJsonSchemaAuthorization'
description: Details about the authorization to create.
required:
- idempotency_key
- authorization
/payments/{payment_id}/capture:
post:
operationId: capture-payment
summary: Capture payment
description: 'Updates a payment with the given amount and finalizes it so that it can be paid out in the next nightly settlement batch.
**This endpoint is not rate limited.**
Scopes: `PAYMENTS_WRITE`'
tags:
- payments
parameters:
- name: payment_id
in: path
required: true
schema:
type: string
- name: Accept
in: header
required: true
schema:
type: string
- name: X-Region
in: header
required: true
schema:
type: string
- name: X-Signature
in: header
required: true
schema:
type: string
- name: User-Agent
in: header
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Payments_capture-payment_Response_200'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
idempotency_key:
$ref: '#/components/schemas/IdempotencyKey'
amount:
type: integer
description: 'The amount of money to collect from the customer, in the lowest denomination of currency for the payment.
To over-capture or under-capture the payment, set this field to a different value from the current payment amount.
Min value: `1`'
required:
- idempotency_key
- amount
/payments/{payment_id}/void:
post:
operationId: void-payment
summary: Void payment
description: "Moves an authorized payment to the voided state and releases the payment authorization from the customer's Cash App account.\n\n \nYou can only void an authorized payment. If a payment is captured, refund it instead. You cannot void any payment that has had an attempted capture. Authorizations not captured within seven days are automatically voided.\n\n\nThis endpoint will return a success message if the payment was successfully voided _or_ if the payment was previously voided.\n\n**This endpoint is not rate limited.**\n\nScopes: `PAYMENTS_WRITE`\n\nPayment voids can be processed synchronously or asynchronously depending on payment type. The majority of voids are made synchronously."
tags:
- payments
parameters:
- name: payment_id
in: path
required: true
schema:
type: string
- name: Accept
in: header
required: true
schema:
type: string
- name: X-Region
in: header
required: true
schema:
type: string
- name: X-Signature
in: header
required: true
schema:
type: string
- name: User-Agent
in: header
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Payments_void-payment_Response_200'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/payments/void-by-idempotency-key:
post:
operationId: void-payment-by-idempotency-key
summary: Void payment by idempotency key
description: "Moves an authorized payment to the voided state and releases the payment authorization from the customer's Cash App account.\n\n \n You can only void an authorized payment. If a payment is captured, refund the payment instead.\n \n You cannot void any payment that has had an attempted capture. Authorizations not captured within seven days are automatically voided.\n \n\nThis endpoint will return a success message if the payment was successfully voided _or_ if the payment was previously voided.\n\n**This endpoint is not rate limited.**\n\nScopes: `PAYMENTS_WRITE`"
tags:
- payments
parameters:
- name: Accept
in: header
required: true
schema:
type: string
- name: X-Region
in: header
required: true
schema:
type: string
- name: X-Signature
in: header
required: true
schema:
type: string
- name: User-Agent
in: header
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Payments_void-payment-by-idempotency-key_Response_200'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
idempotency_key:
type: string
description: Idempotency key used in the [create payment](Network-API.v1.yaml/paths/~1payments/post) request for the payment you want to void.
required:
- idempotency_key
components:
schemas:
PaymentEnrichmentsInitiationActor:
type: string
enum:
- CUSTOMER
- MERCHANT
description: 'The party who initiated the payment.
- `CUSTOMER`
- `MERCHANT`'
title: PaymentEnrichmentsInitiationActor
Create-payment-authorizationRequestBadRequestError:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
description: "A list of errors indicating why the request failed.\n \nMin number of items: `1`"
authorization:
$ref: '#/components/schemas/Authorization'
required:
- errors
title: Create-payment-authorizationRequestBadRequestError
PaymentsPostRequestBodyContentApplicationJsonSchemaPayment:
type: object
properties:
amount:
type: integer
description: 'The amount of money to charge the customer, in the lowest denomination of currency for the payment.
Min value: `1`'
currency:
$ref: '#/components/schemas/Currency'
merchant_id:
type: string
description: 'ID of the merchant to make the payment to.
Min length: `1`
Max length: `128`'
grant_id:
type: string
description: 'A grant ID from the Customer Request API that indicates permission to take the payment.
Min length: `1`
Max length: `256`'
reference_id:
type: string
description: 'A user-defined identifier for this payment, typically used to associate the payment with a record in an external system.
Min length: `1`
Max length: `1024`'
capture:
type: boolean
default: true
description: 'Whether or not to automatically capture the payment once it''s created.
Default: `true`'
metadata:
$ref: '#/components/schemas/Metadata'
enrichments:
$ref: '#/components/schemas/PaymentEnrichments'
required:
- amount
- currency
- merchant_id
- grant_id
description: Data about the payment to create.
title: PaymentsPostRequestBodyContentApplicationJsonSchemaPayment
Payment:
type: object
properties:
id:
type: string
description: 'Unique identifier for this payment issued by Cash App.
Min length: `1`
Max length: `128`'
amount:
type: integer
description: 'The amount of money to collect, in the lowest denomination of currency on the payment. This is the _original_ amount authorized when the payment was created.
Min value: `1`'
net_amount:
type: integer
description: 'The amount remaining after refunds and voided payments are deducted from the amount field. The amount will be in the lowest denomination of the currency on the payment.
This is the amount that will be shown to the customer in their Cash App account.
Min value: `0`'
captured_amount:
type: integer
description: 'The amount of money on this payment that has been allocated for settlement. The amount will be in the lowest denomination of the currency on the payment.
Min value: `0`'
voided_amount:
type: integer
description: 'The amount of money on this payment that is no longer authorized and has been released back to the customer. The amount will be in the lowest denomination of the currency on the payment.
Min value: `0`'
refunded_amount:
type: integer
description: 'Sum of captured refunds in the lowest denomination of currency on the payment.
Min value: `0`'
currency:
$ref: '#/components/schemas/Currency'
customer_id:
type: string
description: 'ID of the customer that sent this payment.
Min length: `1`
Max length: `128`'
merchant_id:
type: string
description: 'ID of the merchant that received this payment.
Min length: `1`
Max length: `128`'
grant_id:
type: string
description: 'ID of the grant to used to create this payment.
Min length: `1`
Max length: `256`'
status:
$ref: '#/components/schemas/PaymentStatus'
description: 'The step of the payment processing lifecycle that this payment is currently at.
- `AUTHORIZED`
- `CAPTURED`
- `VOIDED`
- `DECLINED`'
created_at:
type: string
format: date-time
description: When this payment was created, in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).
updated_at:
type: string
format: date-time
description: When this payment was last updated, in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).
capture_before:
type: string
format: date-time
description: When this payment should be captured by, in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).
refund_ids:
type: array
items:
type: string
description: 'A list of one or more IDs associated with refunds issued for this payment.
Min array length: `1`
Min length of IDs: `1`
Max length of IDs: `128`'
reference_id:
type: string
description: 'A user-defined identifier for this payment, typically used to associate the payment with a record in an external system.
Min length: `1`
Max length: `1024`'
metadata:
$ref: '#/components/schemas/Metadata'
enrichments:
$ref: '#/components/schemas/PaymentEnrichments'
decline_errors:
type: array
items:
$ref: '#/components/schemas/Error'
description: 'If the payment was declined, contains a list of the reasons why it was declined.
Min number of items: `1`'
fee_amount:
type: number
format: double
description: The total fee amount that was charged to the merchant for processing this payment.
fee_rate:
$ref: '#/components/schemas/FeeRate'
description: The breakdown of the fee that was charged to the merchant for processing this payment.
authorization_updates:
type: array
items:
$ref: '#/components/schemas/Authorization'
description: "A list of authorization update attempts associated with this payment, sorted in chronological order.\n\nNote: This field contains only the authorization update attempts, so this field will be empty when \nthe payment is first created (even though the amount is authorized in this flow, it is not an update)."
required:
- id
- amount
- net_amount
- captured_amount
- voided_amount
- refunded_amount
- currency
- customer_id
- merchant_id
- grant_id
- status
- created_at
- updated_at
title: Payment
Payments_retrieve-payment_Response_200:
type: object
properties:
payment:
$ref: '#/components/schemas/Payment'
required:
- payment
title: Payments_retrieve-payment_Response_200
FeeRate:
type: object
properties:
basis_points:
type: integer
description: The variable fee charged for processing the payment expressed as 1/100th of a percentage.
fixed_amount:
type: integer
description: "The amount charged for processing the payment, in the lowest denomination of currency on the payment.\n **Note: The currency for the fee is found on the fee plan.**"
description: A fee rate contains the components of a fee charged by Cash App to partners for a given payment.
title: FeeRate
PaymentEnrichments:
type: object
properties:
initiation:
$ref: '#/components/schemas/PaymentEnrichmentsInitiation'
description: If present, provides information about transaction initiation.
recurring_series_id:
type: string
description: 'If present, indicates that this payment is part of a recurring series of payments, such as a subscription.
The value should contain a unique identifier for the recurring series that is constant across all of its payments, so it can be used to group them together.
Min length: `1`
Max length: `1024`'
statement_descriptor:
type: string
description: 'If present, adds the descriptor as line item on to a customer''s payment receipt in their in-app Activity page.
The descriptor will be present under the header "On statement as".
Statement descriptor requirements vary by platform. If the input for this field exceeds the character limit, it will be truncated to the limit, then suffixed with an ellipsis (...).
Min length: `1`
Max length: `22`'
restricted_categories:
type: array
items:
$ref: '#/components/schemas/PaymentEnrichmentsRestrictedCategoriesItems'
description: If present, indicates that this payment is associated with one or more restricted categories. Contact the Cash App Pay support team to use this field.
description: "Describes optional fields beyond core payment information to supplement payment processing.\n\nEnrichments provide additional context about a payment, which can improve the overall payment experience including, but not limited to: \n - Increased approval rates\n - Enhanced transaction insights\n - Better payment flows in Cash App"
title: PaymentEnrichments
Payments_void-payment_Response_200:
type: object
properties:
payment:
$ref: '#/components/schemas/Payment'
required:
- payment
title: Payments_void-payment_Response_200
Error:
type: object
properties:
category:
$ref: '#/components/schemas/ErrorCategory'
description: The high-level reason the error occurred.
code:
type: string
description: 'A unique identifier for the specific type of error that occurred. For more information, see [Error Code Reference](/cash-app-pay-partner-api/guides/technical-guides/api-fundamentals/errors/error-code-reference).
Min length: `1`'
detail:
type: string
description: 'Human-readable description of why the error occurred and how to resolve it.
Min length: `1`'
field:
type: string
description: 'The field in the request that caused the error, using array and object dot notation.
Min length: `1`'
required:
- category
- code
description: Represents an error encountered during a request to the API.
title: Error
PaymentStatus:
type: string
enum:
- AUTHORIZED
- CAPTURED
- VOIDED
- DECLINED
description: 'The step of the payment processing lifecycle that this payment is currently at.
- `AUTHORIZED`
- `CAPTURED`
- `VOIDED`
- `DECLINED`'
title: PaymentStatus
Retrieve-paymentRequestNotFoundError:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
required:
- errors
title: Retrieve-paymentRequestNotFoundError
Currency:
type: string
enum:
- USD
description: 'Indicates the country associated with an entity. Values are from the [ISO-4217 Alpha-3](https://www.iso.org/iso-4217-currency-codes.html) specification.
Current values:
- `USD`: United States Dollar'
title: Currency
Payments_create-payment-authorization_Response_201:
type: object
properties:
authorization:
$ref: '#/components/schemas/Authorization'
required:
- authorization
title: Payments_create-payment-authorization_Response_201
ErrorCategory:
type: string
enum:
- API_ERROR
- AUTHENTICATION_ERROR
- BRAND_ERROR
- DISPUTE_ERROR
- MERCHANT_ERROR
- INVALID_REQUEST_ERROR
- PAYMENT_PROCESSING_ERROR
- RATE_LIMIT_ERROR
- WEBHOOK_ERROR
- API_KEY_ERROR
- GRANT_ERROR
description: The high-level reason the error occurred.
title: ErrorCategory
Payments_create-payment_Response_201:
type: object
properties:
payment:
$ref: '#/components/schemas/Payment'
title: Payments_create-payment_Response_201
IdempotencyKey:
type: string
description: A unique identifier which can be used by Cash App to de-duplicate retries of this request, making it idempotent. For more information, see [Idempotency](/cash-app-pay-partner-api/guides/technical-guides/api-fundamentals/idempotency).
title: IdempotencyKey
PaymentEnrichmentsRestrictedCategoriesItems:
type: string
enum:
- ALCOHOL
- FINANCIAL_SERVICES
- CANNABIS
title: PaymentEnrichmentsRestrictedCategoriesItems
Payments_list-payments_Response_200:
type: object
properties:
payments:
type: array
items:
$ref: '#/components/schemas/Payment'
description: List of payments matching the given query parameters.
cursor:
type: string
description: The pagination cursor to be used in a subsequent request. If empty, this is the final response.
required:
- payments
title: Payments_list-payments_Response_200
ErrorResponse:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
description: 'A list of errors that occurred while processing the request.
Min number of items: `1`'
required:
- errors
title: ErrorResponse
AuthorizationStatus:
type: string
enum:
- AUTHORIZED
- DECLINED
description: 'The step of the authorization processing lifecycle that this authorization is currently at.
Allowed values:
- AUTHORIZED
- DECLINED'
title: AuthorizationStatus
Metadata:
type: object
additionalProperties:
type: string
description: 'Freeform key-value pairs of arbitrary data associated with this resource.
Keys and values must be passed as strings and not contain any personally identifiable information (PII).
Min keys: `0`
Max keys: `50`
> Note: Nested keys are not supported.'
title: Metadata
Authorization:
type: object
properties:
id:
type: string
description: 'Unique identifier for this authorization issued by Cash App.
Min length: 1 character
Max length: 128 characters'
amount:
type: integer
description: Total authorized amount after this authorization was processed, in the lowest denomination of currency on the payment.
currency:
$ref: '#/components/schemas/Currency'
status:
$ref: '#/components/schemas/AuthorizationStatus'
description: 'The step of the authorization processing lifecycle that this authorization is currently at.
Allowed values:
- AUTHORIZED
- DECLINED'
created_at:
type: string
format: date-time
description: When this authorization was created, in RFC 3339 format (UTC).
payment_id:
type: string
description: ID of the payment associated with this authorization
previous_amount:
type: integer
description: Total authorized amount before this authorization was requested
reference_id:
type: string
description: 'A user-defined identifier for this authorization, typically used to associate the authorization with a record in an external system.
Min length: 1
Max length: 1024'
metadata:
$ref: '#/components/schemas/Metadata'
decline_errors:
type: array
items:
$ref: '#/components/schemas/Error'
description: 'If the authorization was declined, it contains a list of the reasons why it was declined.
Min number of items: 1'
required:
- id
- amount
- currency
- status
- created_at
- payment_id
- previous_amount
description: Represents an authorization update for a payment
title: Authorization
Payments_void-payment-by-idempotency-key_Response_200:
type: object
properties:
payment:
$ref: '#/components/schemas/Payment'
required:
- payment
title: Payments_void-payment-by-idempotency-key_Response_200
Payments_capture-payment_Response_200:
type: object
properties:
payment:
$ref: '#/components/schemas/Payment'
required:
- payment
title: Payments_capture-payment_Response_200
PaymentEnrichmentsInitiation:
type: object
properties:
actor:
$ref: '#/components/schemas/PaymentEnrichmentsInitiationActor'
description: 'The party who initiated the payment.
- `CUSTOMER`
- `MERCHANT`'
required:
- actor
description: If present, provides information about transaction initiation.
title: PaymentEnrichmentsInitiation
Create-paymentRequestBadRequestError:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
description: 'A list of errors indicating why the request failed.
Min number of items: `1`'
payment:
$ref: '#/components/schemas/Payment'
required:
- errors
title: Create-paymentRequestBadRequestError
PaymentsPaymentIdAuthorizationsPostRequestBodyContentApplicationJsonSchemaAuthorization:
type: object
properties:
amount:
type: integer
description: 'The updated total amount of money to collect from the customer, in the lowest denomination of currency for the payment.
This value must be greater than or equal to the current authorized amount'
currency:
$ref: '#/components/schemas/Currency'
reference_id:
type: string
description: 'A user-defined identifier for this authorization, typically used to associate the authorization with a record in an external system.
Min length: `1`
Max length: `1024`'
metadata:
$ref: '#/components/schemas/Metadata'
required:
- amount
- currency
description: Details about the authorization to create.
title: PaymentsPaymentIdAuthorizationsPostRequestBodyContentApplicationJsonSchemaAuthorization