Charge additional amount
Charge additional amount
Charge an additional amount to the subscription
POST
/
v0
/
subscriptions
/
{subscriptionIdOrNumber}
/
charge
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 '{
"description": "<string>",
"items": [
{
"name": "Premium Plan",
"unitPrice": 10000,
"currency": "USD",
"quantity": 1,
"offerId": "123e4567-e89b-12d3-a456-426614174000",
"price": 8.988465674311579e+307,
"value": 8.988465674311579e+307
}
]
}'
{
"status": "<string>",
"data": {
"payment": {
"object": "payment",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "one_time",
"number": "<string>",
"status": "PENDING",
"value": 0,
"tax": 0,
"fee": 0,
"currency": null,
"currencyDecimals": null,
"createdAt": 4503599627370495,
"userId": null,
"user": null,
"orderId": null,
"orderNumber": null,
"order": null,
"subscriptionId": null,
"subscription": null,
"invoiceNumber": null,
"invoiceUrl": null
}
}
}
Path Parameters
Subscription ID or order number
Body
application/json
POST /v0/subscriptions/:subscriptionIdOrNumber/charge Request body
The body is of type object
.
Response
200
application/json
POST /v0/subscriptions/:subscriptionIdOrNumber/charge Positive response
The response is of type object
.
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 '{
"description": "<string>",
"items": [
{
"name": "Premium Plan",
"unitPrice": 10000,
"currency": "USD",
"quantity": 1,
"offerId": "123e4567-e89b-12d3-a456-426614174000",
"price": 8.988465674311579e+307,
"value": 8.988465674311579e+307
}
]
}'
{
"status": "<string>",
"data": {
"payment": {
"object": "payment",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "one_time",
"number": "<string>",
"status": "PENDING",
"value": 0,
"tax": 0,
"fee": 0,
"currency": null,
"currencyDecimals": null,
"createdAt": 4503599627370495,
"userId": null,
"user": null,
"orderId": null,
"orderNumber": null,
"order": null,
"subscriptionId": null,
"subscription": null,
"invoiceNumber": null,
"invoiceUrl": null
}
}
}