POST /api/v1/simulation/billing/payment_sources/{id}/fail_next_autocharge
Fail next autocharge
POST /api/v1/simulation/billing/payment_sources/{id}/fail_next_autocharge
Use this endpoint to simulate the failure of the next auto charge execution of a payment source. This will cause the next scheduled auto-charge to fail, allowing you to test error handling and retry logic in your billing workflows. This is only available in the Sandbox environment.
Unique identifier of the Payment Source object.
Unique identifier of the Billing Customer that this Payment Source belongs to.
Time when this Payment Source was created.
Unique identifier of the Payment Consent associated with the Payment Source.
Unique identifier of the Payment Source object.
Unique identifier of the linked payment account to collect payment. You can find this unique identifier in the Airwallex web app > Settings > Account details, within the Account Information section.
A set of string key-value pairs that you can attach to this object for storing additional information.
Time when this Payment Source was last updated.
| Error status | Description |
|---|---|
| 400 | invalid_argument |
| 401 | credentials_invalid |
| 404 | not_found |
| 500 | service_unavailable |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/simulation/billing/payment_sources/billing_id/fail_next_autocharge' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "billing_customer_id": "bcus_hkpd7fedfgb004apkvs",3 "created_at": "2022-01-01T10:15:30+0000",4 "external_id": "cst_u79lnfufjxxfdc0",5 "id": "psrc_d3Ds20ae5VihKs092",6 "linked_payment_account_id": "acct_ncI2nypPKSq2VXKxscAcg",7 "metadata": {8 "foo": "bar"9 },10 "updated_at": "2022-01-01T10:15:30+0000"11}