The Payment Object
A Payment in Audata Promo is created for every cash prize. The Payment record represents a transaction that needs to be paid (or has been paid) from the organisation to a prize winner.
Creating and Deleting Payments
Payments are different to other resources in that they can not be manually created or deleted, even via the API. Payments are automatically created by the system whenever a cash prize is awarded. If the prize is deleted, the associated payment is also removed within 24 hours.
NOTEIt's possible that after a cash prize has been deleted or withdrawn, the Payment may still exist for a while. For this reason, we recommend using the prize_id to also lookup the related Prize and verify it exists before using the Payment data for anything in production.
Updating Payments
You can update the “paid_at” attribute to record a payment as having been paid. To change other details for a payment, you must instead delete the associated Prize and then create a new one, which will also trigger the creation of a new associated Payment record.
| Value | Type | Description |
|---|---|---|
| uuid | string | Payment UUID (blueprint identifier). |
| amount | number | Payment amount. |
| paid_at | string | Timestamp when paid. |
| approved_at | string | Timestamp when approved. |
| declined_at | string | Timestamp when declined. |
| prize | object | Serialized Prize object via PrizeBlueprint when present. |
| listener | object | Serialized Listener object via ListenerBlueprint when present. |
| bank_account | object | Inline object with uuid, created_at, updated_at when present. |
| station_uuid | string | Station UUID when station_id is present. |
| created_at | string | Record creation timestamp. |
| updated_at | string | Record update timestamp. |
