Skip to main content
A gift certificate holds a balance a customer can spend. This area creates, lists, reads, updates and deletes certificates, sets a new balance, allocates a certificate to an account or takes it back, and reads its allocations and transactions. It has 12 endpoints, and every SDK supports all of them.

At a glance

Before you call

Register your API credentials once when your app starts, as shown in Authentication. Every SDK sample on these pages then gets its client in one line. With cURL, send the access token in an Authorization header: Authorization: Bearer $ACCESS_TOKEN.

Things to know

  • Send bodies under gift_certificate. A new certificate takes amount and expiry_date; amounts and balances are decimal strings such as 5.00.
  • Change the balance with amend. POST /gift_certificates/{gc_id}/amend takes only new_balance, and a balance below the amount already used returns 400.
  • Name the account by code when allocating. Send {"account": {"code": "ACC0001"}}. The id form wants the account’s acc_ uuid and returns 404 for the id the accounts API gives you.
  • Allocate and deallocate return 200. Both return the certificate with its allocations; a deallocation changes the entry rather than removing it.
  • status is active or inactive. Set it with an update to stop a certificate being used or allow it again.
  • Listings page by cursor. Send limit, then pass pagination.next_cursor as cursor while pagination.has_more is true.