Credit
Create top-up by external ID
API documentation
Alert
Customer
- GETList customers
- POSTCreate customer
- GETFetch customer by external ID
- PUTUpdate customer by external ID
- GETFetch customer costs by external ID
- POSTUpdate payment methods from payment provider
- GETFetch customer
- PUTUpdate customer
- DELDelete customer
- GETList balance transactions
- POSTCreate customer balance transaction
- GETFetch customer costs
- POSTUpdate payment methods from payment provider
Credit
- GETFetch customer credit balance by external customer id
- GETFetch customer credits ledger by external ID
- POSTCreate ledger entry by external ID
- GETList top-ups by external ID
- POSTCreate top-up by external ID
- DELDeactivate top-up by external ID
- GETFetch customer credit balance
- GETFetch customer credits ledger
- POSTCreate ledger entry
- GETList top-ups
- POSTCreate top-up
- DELDeactivate top-up
Dimensional Price Group
Event
Invoice
Availability
Plan
Price
Subscription Change
Subscription
- GETList subscriptions
- POSTCreate subscription
- GETFetch subscription
- PUTUpdate subscription
- POSTCancel subscription
- GETFetch subscription costs
- GETFetch subscription schedule
- POSTSchedule plan change
- POSTTrigger phase
- POSTUnschedule subscription cancellation
- POSTUnschedule fixed fee quantity updates
- POSTUnschedule plan change
- POSTUpdate price quantity
- POSTUpdate trial for subscription
- GETFetch subscription usage
Price interval
Credit
Create top-up by external ID
This endpoint allows you to create a new top-up for a specified customer’s balance. While this top-up is active, the customer’s balance will added in increments of the specified amount whenever the balance reaches the specified threshold.
If a top-up already exists for this customer in the same currency, the existing top-up will be replaced.
POST
/
customers
/
external_customer_id
/
{external_customer_id}
/
credits
/
top_ups
curl --request POST \
--url https://api.withorb.com/v1/customers/external_customer_id/{external_customer_id}/credits/top_ups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"currency": "<string>",
"threshold": "<string>",
"amount": "<string>",
"per_unit_cost_basis": "<string>",
"invoice_settings": {
"auto_collection": true,
"net_terms": 123,
"memo": "<string>",
"require_successful_payment": false
},
"expires_after": 123,
"expires_after_unit": "day",
"active_from": "2023-11-07T05:31:56Z"
}'
{
"id": "<string>",
"currency": "<string>",
"threshold": "<string>",
"amount": "<string>",
"per_unit_cost_basis": "<string>",
"invoice_settings": {
"auto_collection": true,
"net_terms": 123,
"memo": "<string>",
"require_successful_payment": false
},
"expires_after": 123,
"expires_after_unit": "day"
}
Authorizations
API Keys can be issued in the Orb's web application.
Path Parameters
Body
application/json
Response
201
application/json
Created
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.withorb.com/v1/customers/external_customer_id/{external_customer_id}/credits/top_ups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"currency": "<string>",
"threshold": "<string>",
"amount": "<string>",
"per_unit_cost_basis": "<string>",
"invoice_settings": {
"auto_collection": true,
"net_terms": 123,
"memo": "<string>",
"require_successful_payment": false
},
"expires_after": 123,
"expires_after_unit": "day",
"active_from": "2023-11-07T05:31:56Z"
}'
{
"id": "<string>",
"currency": "<string>",
"threshold": "<string>",
"amount": "<string>",
"per_unit_cost_basis": "<string>",
"invoice_settings": {
"auto_collection": true,
"net_terms": 123,
"memo": "<string>",
"require_successful_payment": false
},
"expires_after": 123,
"expires_after_unit": "day"
}