Create a price
/pricesHeaders
AuthorizationstringRequiredidempotency-keystringA unique key, such as a UUID, that makes a POST safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace. A retry with the same key, endpoint and body gets the first response. Another endpoint or body gets 400 idempotency_error, and a retry while the first is running gets 409.
Parameters
productstringRequiredcurrencystringRequiredThree-letter ISO currency code, in lowercase.
unit_amountintegerRequiredtax_behaviorstringexclusive adds tax to the amount, and inclusive includes it.
referencestringYour ID for the price, unique for its product.
scheduleobjectMakes the price recurring.
Show 2 child parametersHide child parameters
intervalstringRequiredinterval_countintegersubscription_optionsobjectDefaults for subscriptions on this price: the engine, and rules that override your subscription settings'.
Show 4 child parametersHide child parameters
enginestringconnectionstringfailed_paymentobjectWhat Pay.com's engine does when a renewal fails, replacing a package's retry settings. Engines that retry themselves ignore it: Pay.com never retries a charge another system retries.
Show 3 child parametersHide child parameters
retry_after_daysarray of integersDays after the failed renewal for each retry, for example [3, 5, 7]. Pay.com also retries soon after a card is updated.
final_actionstringWhat happens after the last retry fails.
grace_daysintegerDays the customer keeps access while unpaid.
disputesobjectWhat happens to a subscription when one of its payments is disputed.
Show 1 child parameterHide child parameters
actionstringactivebooleanmetadataobjectYour key-value pairs. Up to 50 keys of 40 characters, with string values of up to 500 characters.
Returns
The price, at version 1.
idstringresourcestringproductstringreferencestring or nulltypestringrecurring for a price with a schedule.
scheduleobject or nullShow 2 child attributesHide child attributes
Option 1objectHow often a recurring price bills.
Show 2 child attributesHide child attributes
intervalstringRequiredinterval_countintegerOption 2nullsubscription_optionsobject or nullShow 2 child attributesHide child attributes
enginestringconnectionstring or nullcurrencystringThree-letter ISO currency code, in lowercase.
Show 8 more attributesShow fewer attributes
unit_amountintegertax_behaviorstringexclusive adds tax to the amount, and inclusive includes it.
versionintegercurrent_versionintegerThe latest version. Differs from version when you ask for an earlier one.
activebooleanmetadataobjectYour key-value pairs. Up to 50 keys of 40 characters, with string values of up to 500 characters.
createdstringtest_modebooleanErrors
400401403404409