Payments

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.

🚧

NOTE

It'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.

ValueTypeDescription
uuidstringPayment UUID (blueprint identifier).
amountnumberPayment amount.
paid_atstringTimestamp when paid.
approved_atstringTimestamp when approved.
declined_atstringTimestamp when declined.
prizeobjectSerialized Prize object via PrizeBlueprint when present.
listenerobjectSerialized Listener object via ListenerBlueprint when present.
bank_accountobjectInline object with uuid, created_at, updated_at when present.
station_uuidstringStation UUID when station_id is present.
created_atstringRecord creation timestamp.
updated_atstringRecord update timestamp.