Returns a list of top-ups.
Parameters
- statusstring
Only return top-ups that have the given status. One of
canceled,failed,pendingorsucceeded.
More parameters
- amountobject
- createdobject
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
A dictionary containing the data property, which is an array of separate top-up objects. The number of top-ups in the array is limited to the number designated in limit. If no more top-ups are available, the resulting array will be empty.
Response
{ "object": "list", "url": "/v1/topups", "has_more": false, "data": [ { "id": "tu_1NG6yj2eZvKYlo2C1FOBiHya", "object": "topup", "amount": 2000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up for Jenny Rosen", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "source": null, "statement_descriptor": "Top-up", "status": "pending", "transfer_group": null } ]}Cancels a top-up. Only pending top-ups can be canceled.
Parameters
No parameters.
Returns
Returns the canceled top-up. If the top-up is already canceled or can’t be canceled, an error is returned.
Response
{ "id": "tu_1NG6yj2eZvKYlo2C1FOBiHya", "object": "topup", "amount": 2000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up for Jenny Rosen", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "source": null, "statement_descriptor": "Top-up", "status": "canceled", "transfer_group": null}