Skip to content
iSmartPayDevelopers
Esc
↑↓navigate↵open⌘Jpreview

subscription.charge_upcoming

Sent once per cycle, three days before the first attempt of a charge, while the subscription is active or past_due. Needs mandates.read to appear in the events list. Answer with any 2xx within 10 seconds. Anything else, a timeout or a redirect is retried up to 6 times over about a day. Events can arrive out of order, so compare statuses and cycles rather than trusting arrival order.

POSTsubscription.charge_upcomingWebhook
Header parameters
Webhook-Idstringrequired

The event id. The same event can arrive more than once; use this to ignore repeats.

Webhook-Timestampstringrequired

Unix seconds when this attempt was signed. Reject a delivery older than 5 minutes.

Webhook-Signaturestringrequired

v1, then a comma, then the base64 HMAC-SHA256 of "{Webhook-Id}.{Webhook-Timestamp}.{raw body}" keyed with your endpoint's signing secret. Compare in constant time.

Request body
requiredapplication/json
idstringrequired

The event id, the same as the Webhook-Id header.

typestringrequired
createdAtstring<date-time>required

When the change happened.

dataSubscriptionChargeUpcomingDatarequired

The charge that is coming up.

Show properties
subscriptionIdstringrequired
matches ^sub_[0-9a-f]{32}$
subscriptionReferencestringrequired
cycleintegerrequired
dueAtstring<date-time>required
amountstringrequired

What the customer is charged, fee included. A decimal string in major units.

currencystringrequired
Responses
2XX

Received. Any 2xx stops retries.

Payload
{
  "id": "string",
  "type": "subscription.charge_upcoming",
  "createdAt": "2019-08-24T14:15:22Z",
  "data": {
    "subscriptionId": "string",
    "subscriptionReference": "string",
    "cycle": 0,
    "dueAt": "2019-08-24T14:15:22Z",
    "amount": "152.25",
    "currency": "GHS"
  }
}
Response
Received. Any 2xx stops retries.