We recommend that partners use the Pay Kit SDK to integrate with Cash App Pay.
Before getting started, confirm with the Cash App Pay Partner Engineering team that the API-only approach is right for you. Make sure that you have access to:
We recommend reading the following pages:
First, create a Brand and associate a Merchant with that brand.
These APIs are server-side between your website or application and Cash App Pay.
To link a Customer to the Merchant, Brand, or Client, do the following:
Create a customer request with one Channel and at least one Action.
See the list of supported actions and channels here. You can have many actions but only one channel.
Save the Request ID and the URL from the auth_flow_triggers object in the response.
When you call create customer request, a customer request is returned to you with auth_flow_triggers populated. This gives you access to URLs including the QR Code URL, Mobile URL, and Desktop URL.
Listen for updates to the customer request.
When the request enters the approved state, stop polling.
Save the Grant IDs listed in the grants array to create a payment later.
To test the customer request, you can use the Sandbox App or Sandbox Web to scan and approve the request. See more at Sandbox App and Developer Sandbox.
You can listen for updates to the customer request in two ways:
customer_request.state.updated event.QR codes rotate every 30 seconds and expire every 60 seconds, so you must get the latest QR code. This will change based on how you listen for customer request updates:
refreshes_at value.refreshes_at value. The auth flow triggers will contain the newest, valid QR code.These APIs are client-side from the browser to Cash App.
Example - Create Customer Request
Example - Retrieve Customer Request
You can now create a payment using the Grant ID and Merchant ID from the previous steps using the Create a payment request endpoint. You can use void, capture, or refund actions depending on the state of the payment.
We use magic values in the amount field to determine outcomes for payments in the sandbox environment. You can use any amount, but these amounts will result in specific outcomes.
Example - Create Payment
Pay Kit is the name of the Cash App Pay SDK. This SDK specifically handles linking a Customer to a Merchant and uses the Customer Request API underneath. Instead of using the SDK, you can call the APIs directly as described in the steps to integrate with the Cash App Pay API above. To know more about our SDK, see Pay Kit.
Cash App Pay Network API and Management API require that all requests be signed. However, when using Sandbox, you can skip this by setting x-signature to the value sandbox:skip-signature-check. Use these Magic Values to control the behavior in Sandbox and to produce preset outcomes.