curl --request POST \
--url https://api.fungies.io/v0/subscriptions/{subscriptionIdOrNumber}/charge \
--header 'Content-Type: application/json' \
--header 'x-fngs-public-key: <api-key>' \
--header 'x-fngs-secret-key: <api-key>' \
--data '
{
"items": [
{
"name": "<string>",
"unitPrice": 123,
"currency": "AFN",
"quantity": 1,
"offerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 8.988465674311579e+307,
"value": 8.988465674311579e+307
}
],
"description": "<string>"
}
'{
"status": "<string>",
"data": {
"payment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "one_time",
"number": "<string>",
"status": "PENDING",
"createdAt": 4503599627370495,
"object": "payment",
"value": 0,
"tax": 0,
"fee": 0,
"currency": null,
"currencyDecimals": null,
"userId": null,
"user": null,
"orderId": null,
"orderNumber": null,
"order": null,
"subscriptionId": null,
"subscription": null,
"invoiceNumber": null,
"invoiceUrl": null
}
}
}Charge an additional amount to an active Subscription. Creates a new Invoice and handles payment processing.
curl --request POST \
--url https://api.fungies.io/v0/subscriptions/{subscriptionIdOrNumber}/charge \
--header 'Content-Type: application/json' \
--header 'x-fngs-public-key: <api-key>' \
--header 'x-fngs-secret-key: <api-key>' \
--data '
{
"items": [
{
"name": "<string>",
"unitPrice": 123,
"currency": "AFN",
"quantity": 1,
"offerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 8.988465674311579e+307,
"value": 8.988465674311579e+307
}
],
"description": "<string>"
}
'{
"status": "<string>",
"data": {
"payment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "one_time",
"number": "<string>",
"status": "PENDING",
"createdAt": 4503599627370495,
"object": "payment",
"value": 0,
"tax": 0,
"fee": 0,
"currency": null,
"currencyDecimals": null,
"userId": null,
"user": null,
"orderId": null,
"orderNumber": null,
"order": null,
"subscriptionId": null,
"subscription": null,
"invoiceNumber": null,
"invoiceUrl": null
}
}
}Subscription ID or order number
POST /v0/subscriptions/:subscriptionIdOrNumber/charge Request body
1 elementShow child attributes
Name of the Item. Required if Offer ID is not provided. Can be used to override the Offer name.
New unit price in cents (min: 100). Required if Offer ID is not provided. Can be used to override the Offer price.
x <= 9007199254740991Valid currency code. Required if value is provided. Required if Offer ID is not provided. Can be used to override the Offer currency.
Note: Currently needs to match Workspace currency.AFN, ALL, DZD, AOA, ARS, AMD, AWG, AUD, AZN, BSD, BDT, BBD, BZD, BMD, BOB, BAM, BWP, BRL, BHD, GBP, BND, BGN, BIF, BYN, KHR, CAD, CVE, KYD, KWD, XAF, XPF, CLP, CNY, COP, KMF, CDF, CRC, HRK, CZK, DKK, DJF, DOP, XCD, EGP, ETB, EUR, FKP, FJD, GMD, GEL, GIP, GTQ, GNF, GYD, HTG, HNL, HKD, HUF, ISK, INR, IDR, ILS, JMD, JPY, JOD, KZT, KES, KGS, LAK, LBP, LSL, LRD, MOP, MKD, MGA, MWK, MYR, MVR, MRO, MUR, MXN, MDL, MNT, MAD, MZN, MMK, NAD, NPR, ANG, TWD, NZD, NIO, NGN, NOK, OMR, PKR, PAB, PGK, PYG, PEN, PHP, PLN, QAR, RON, RUB, RWF, SHP, SVC, WST, STD, SAR, RSD, SCR, SLL, SGD, SBD, SOS, ZAR, KRW, LKR, SRD, SZL, SEK, CHF, TJS, TZS, THB, TND, TOP, TTD, TRY, UGX, UAH, AED, UYU, USD, UZS, VUV, VEF, VND, XOF, YER, ZMW, SLE, XCG, SSP, VES, MRU, STN, VED Optional quantity (default: 1).
1 <= x <= 1.7976931348623157e+308Optional valid Offer ID. Adds Offer reference to the Item.
Note: name, value and currency are derived from the Offer if not provided.
- name: Offer name with full specification
- value: Offer price
- currency: Offer currencyDeprecated. Use value instead.
100 <= x <= 1.7976931348623157e+308Deprecated. Use unitPrice instead.
100 <= x <= 1.7976931348623157e+308POST /v0/subscriptions/:subscriptionIdOrNumber/charge Positive response
"success"Show child attributes
Show child attributes
one_time, subscription_initial, subscription_update, subscription_interval, subscription_extra, claim_free PENDING, PAID, FAILED, UNPAID, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, EXPIRED 0 <= x <= 9007199254740991payment -9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991AFN, ALL, DZD, AOA, ARS, AMD, AWG, AUD, AZN, BSD, BDT, BBD, BZD, BMD, BOB, BAM, BWP, BRL, BHD, GBP, BND, BGN, BIF, BYN, KHR, CAD, CVE, KYD, KWD, XAF, XPF, CLP, CNY, COP, KMF, CDF, CRC, HRK, CZK, DKK, DJF, DOP, XCD, EGP, ETB, EUR, FKP, FJD, GMD, GEL, GIP, GTQ, GNF, GYD, HTG, HNL, HKD, HUF, ISK, INR, IDR, ILS, JMD, JPY, JOD, KZT, KES, KGS, LAK, LBP, LSL, LRD, MOP, MKD, MGA, MWK, MYR, MVR, MRO, MUR, MXN, MDL, MNT, MAD, MZN, MMK, NAD, NPR, ANG, TWD, NZD, NIO, NGN, NOK, OMR, PKR, PAB, PGK, PYG, PEN, PHP, PLN, QAR, RON, RUB, RWF, SHP, SVC, WST, STD, SAR, RSD, SCR, SLL, SGD, SBD, SOS, ZAR, KRW, LKR, SRD, SZL, SEK, CHF, TJS, TZS, THB, TND, TOP, TTD, TRY, UGX, UAH, AED, UYU, USD, UZS, VUV, VEF, VND, XOF, YER, ZMW, SLE, XCG, SSP, VES, MRU, STN, VED -9007199254740991 <= x <= 9007199254740991Show child attributes
PENDING, PAID, FAILED, UNPAID, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, EXPIRED order Show child attributes
all, active, canceled, incomplete, incomplete_expired, past_due, trialing, paused, unpaid subscription