Developer Sandbox
Cash App provides a sandbox environment for developers to test integrations without moving money. This environment can be reached by using the sandbox.api.cash.app host.
This environment has a separate set of credentials from production.
The sandbox can be controlled through magic values (documented below) in order to produce certain behaviors. In other cases, API responses will represent successful actions when given valid requests.
We have a 5-year full backwards compatibilty guarantee that extends to our publicly documented Sandbox Magic Values listed on this page.
Magic Values
Create payment
Field | Value | Result | Description |
---|---|---|---|
amount | 6670 | Connection Error | The payment will be created but the response will be an HTTP error. This simulates potential network failures. The state of the payment can be retrieved using retrieve payment. The request can also be voided through the void payment endpoint |
amount | 7770 | Payment decline: compliance failure | The payment will be created in a declined state, with the reason PAYMENT_DECLINED_COMPLIANCE |
amount | 7771 | Payment decline: insufficient funds | The payment will be created in a declined state, with the reason PAYMENT_DECLINED_INSUFFICIENT_FUNDS |
amount | 7772 | Payment decline: other | The payment will be created in a declined state, with the reason PAYMENT_DECLINED_OTHER |
amount | 7773 | Payment decline: risk | The payment will be created in a declined state, with the reason PAYMENT_DECLINED_RISK |
amount | 7774 | Payment decline: too large | The payment will be created in a declined state, with the reason PAYMENT_INVALID_TOO_LARGE |
amount | 7775 | Payment decline: too small | The payment will be created in a declined state, with the reason PAYMENT_INVALID_TOO_SMALL |
merchant_id | MMI_sandbox:disabled | Payment creation failure: merchant is disabled | The payment will not be created, returning an error of MERCHANT_DISABLED. |
merchant_id | MMI_sandbox:pending | Payment creation failure: merchant is pending | The payment will not be created, returning an error of MERCHANT_PENDING |
merchant_id | MMI_sandbox:missing | Payment creation failure: merchant is missing | The payment will not be created, returning an error of MERCHANT_NOT_FOUND |
grant_id | GRG_sandbox:active | Payment created | The payment will be created. |
grant_id | GRG_sandbox:consumed | Payment decline: grant error | The payment will be created in a declined state, with the reason GRANT_CONSUMED |
grant_id | GRG_sandbox:expired | Payment decline: grant error | The payment will be created in a declined state, with the reason GRANT_EXPIRED |
grant_id | GRG_sandbox:missing | Payment decline: grant error | The payment will be created in a declined state, with the reason GRANT_NOT_FOUND |
grant_id | GRG_sandbox:revoked | Payment decline: grant error | The payment will be created in a declined state, with the reason GRANT_REVOKED |
amount | 8801 | Create dispute: CD10 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of CD10 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8802 | Create dispute: CD11 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of CD11 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8803 | Create dispute: CD12 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of CD12 . The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8804 | Create dispute: CD13 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of CD13 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8811 | Create dispute: FR10 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of FR10 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8812 | Create dispute: FR11 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of FR11 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8821 | Create dispute: PE10 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of PE10 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8822 | Create dispute: PE11 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of PE11 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8823 | Create dispute: PE12 | The payment will be created along with a dispute that has a disputed amount equal to the transaction amount and a reason of PE12 The dispute can be queried through the List Disputes API two seconds after the payment is created. |
amount | 8901 | Create dispute: differing disputed amount | The payment will be created along with a dispute that has a disputed amount different from the payment amount The dispute can be queried through the List Disputes API two seconds after the payment is created. |
Create refund
Field | Value | Result | Description |
---|---|---|---|
amount | 6670 | Connection Error | The refund will be created but the response will be an HTTP error. This simulates potential network failures. The state of the refund can be retrieved using retrieve refund. The request can also be voided through the void refund endpoint |
amount | 7770 | Refund decline: compliance | The refund will be created in a declined state, with the reason REFUND_DECLINED_COMPLIANCE |
amount | 7772 | Refund decline: other | The refund will be created in a declined state, with the reason REFUND_DECLINED_OTHER |
amount | 7773 | Refund decline: risk | The refund will be created in a declined state, with the reason REFUND_DECLINED_RISK |
amount | 7774 | Refund decline: too large | The refund will be created in a declined state, with the reason REFUND_DECLINED_TOO_LARGE |
amount | 7775 | Refund decline: too small | The refund will be created in a declined state, with the reason REFUND_DECLINED_TOO_SMALL |
amount | |||
grant_id | GRG_sandbox:consumed | Refund failure: grant consumed | The refund will be created in a declined state, with the reason GRANT_CONSUMED |
grant_id | GRG_sandbox:expired | Refund failure: grant expired | The refund will be created in a declined state, with the reason GRANT_EXPIRED |
grant_id | GRG_sandbox:missing | Refund failure: grant missing | The refund will be created in a declined state, with the reason GRANT_NOT_FOUND |
grant_id | GRG_sandbox:revoked | Refund failure: grant revoked | The refund will be created in a declined state, with the reason GRANT_REVOKED |
Create file- or text- based dispute evidence
Field | Value | Result | Description |
---|---|---|---|
metadata | {"sandbox:set_dispute_state": "PROCESSING"} | PROCESSING | Dispute adjudicated: PROCESSING |
metadata | {"sandbox:set_dispute_state": "WON"} | WON | Dispute adjudicated: WON |
metadata | {"sandbox:set_dispute_state": "PARTIALLY_WON"} | PARTIALLY_WON | Dispute adjudicated: PARTIALLY_WON |
metadata | {"sandbox:set_dispute_state": "LOST"} | LOST | Dispute adjudicated: LOST |
API Key (Signed) Requests
Header | Value | Result | Description |
---|---|---|---|
X-Signature | sandbox:skip-signature-check | valid request signature | The request will be treated as if it contains a valid signature. |