Creates a price governing the referral fee applied to payins, which you then attach to a payin or an order by passing its ID as price_id. The fee it produces is returned as referral_fee on the payment and in a quote's fees breakdown.
Every price created here governs the referral fee — there is no fee type to choose, which is why the Price object carries no fee_type field. GET /prices lists these and only these.
pricing_type selects the shape of the rule and which other fields are permitted — sending a field belonging to the other shape is rejected rather than ignored:
fixedrequiresfees_amountandfees_currency, and must not includebps.percentagerequiresbps, and must not includefees_amountorfees_currency.
The first referral-fee price you create becomes your default automatically, whether or not you send set_as_default. After that, sending set_as_default: true promotes this price and demotes the previous default — a business has at most one default referral-fee price at a time. The default is what applies when a payin does not name a price_id.
The amount that will be deducted from your balance for this pricing. A positive integer representing the smallest currency unit. For example, if the amount is $299.00, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, for amount ¥295, pass the value as 295
The percentage fee, in basis points: 1 basis point is 0.01%, so 1000 is 10%. Required when pricing_type is percentage, and must not be sent when it is fixed.
- Production serverhttps://api.glomopay.com/api/v1/prices
curl -i -X POST \
https://api.glomopay.com/api/v1/prices \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"pricing_type": "fixed",
"fees_currency": "USD",
"fees_amount": 1000,
"bps": 1000,
"set_as_default": true
}'Payout created successfully
The unique identifier for the price. Pass this value as price_id when creating a payin or an order to apply this referral fee to it.
The amount that will be deducted from your balance for this pricing. A positive integer representing the smallest currency unit. For example, if the amount is $299.00, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, for amount ¥295, pass the value as 295
The percentage fee, in basis points: 1 basis point is 0.01%, so 1000 is 10%. Required when pricing_type is percentage, and must not be sent when it is fixed.
Set this pricing as default for the business. Overrides the previously set default if set to true.
When the price was created, as an ISO 8601 date-time in UTC.
{ "id": "price_DdWp_HUbOnlg", "pricing_type": "fixed", "fees_amount": 1000, "fees_currency": "USD", "bps": 1000, "set_as_default": true, "created_at": "2021-06-01T12:00:00Z", "updated_at": "2021-06-01T12:00:00Z" }