Skip to main content

Fetch a single transaction

Step 5 of 5. Always confirm a charge before you give the customer value, such as extending their subscription or crediting their wallet. Use both the webhook and the API.

Listen for the webhook

When a charge succeeds, Nomba sends a payment_success webhook to your webhook URL, with the same structure as the first payment. When a charge fails, Nomba sends payment_failed. Match the webhook to the charge by data.order.orderReference. data.order.isTokenizedCardPayment is "true" (a string) for a charge on a saved card, and "false" for the first, card-saving payment. Use it to tell renewals apart from first payments in your webhook handler. Nomba retries a webhook if your server doesn’t respond with a 2xx status, so the same event can arrive more than once. Give value only once for each orderReference.

GET /v1/transactions/accounts/single

Look up the charge by your orderReference. For other ways to look up a transaction, see Verify transactions.

Headers

string
required
Bearer <access_token>
string
required
Your account ID

Query parameters

string
required
The orderReference you sent with the charge

Response body

string
required
"SUCCESS" when the charge succeeded
string
required
The transaction amount
string
required
Your orderReference
The charge succeeded only if all of these are true:
  • data.status is "SUCCESS".
  • data.onlineCheckoutOrderReference matches the orderReference you charged.
  • The amount matches the amount you charged.
If the status is anything else, don’t give value yet. Check again later, or wait for the webhook.

Manage saved cards

List a customer’s saved cards, change the email linked to a card, or delete a card.