Skip to content

Onetime

POSThttps://rebuyengine.com/api/v1/recharge/onetime

Use Cases

Use this endpoint to create one-time purchases with a single click.

Query Parameters

address_id · string
The address to attach the onetime to. If you do not have access to the Recharge address_id you can instead pass a Recharge charge_id and Rebuy will infer the address_id from the given charge_id.
charge_id · string
This argument is an alternative for address_id. If you do not have access to the Recharge address_id you can instead pass a Recharge charge_id and Rebuy will infer the address_id from the given charge_id.
next_charge_scheduled_at · string
The value to set for the next_charge_scheduled_at field. Use the keyword today or tomorrow to have Rebuy set the next charge scheduled at date automatically. Example: tomorrow.
shopify_variant_id · string
The Shopify variant ID to create the onetime purchase for.
quantity · string
The quantity of Shopify variant ID to create the onetime purchase for.
charge_now · string
Use this argument and pass yes to charge the users card immediately and create the order.
format · string
Valid values: pretty. Use pretty to make the response easy to read.

Code Example

// POST https://rebuyengine.com/api/v1/recharge/onetime
const params = new URLSearchParams({
  address_id: "YOUR_VALUE",
  charge_id: "YOUR_VALUE"
});

fetch(`https://rebuyengine.com/api/v1/recharge/onetime?${params}`)
  .then(response => response.json())
  .then(data => console.log(data));

Response Examples

200 - 200

// Need Example Response

400 - 400

// Need Error Response