Create customer prepaid order by price
1 min
POST
https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid
Body Parameters
- bodypayment.pricing.customer.CustomerPrepaidByPrice.inDescription
- idstringDescription
- customerIdstringDescription
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- firstCardEndTimeSecondsinteger<int64>Description
- productIdstringDescription
- prepaidOfferVersioninteger<int64>Description
- prepaidPricenumberDescription
- originalWorthnumberDescription
- originalCurrencystringExampleDescription
- preferredPurchasingPrepaidCurrencystringExampleDescription
- recurrenceFrequencypayment.pricing.BillingPeriod.inDescription
- intervalpayment.pricing.BillingPeriodInterval.inDescription
- intervalsCountinteger<int32>Description
- externalPaymentbooleanDescription
- relationIdstringDescription
- createdTimeInSecondsinteger<int64>Description
- labelstringDescription
- prepaidConditionspayment.billing.prepaid_to_product.PrepaidConditions.in
- prepaidConditionsListpayment.billing.prepaid_to_product.PrepaidCondition.in[]Description
- payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in
- typestringDescriptionDefaultDimensionValueMapPrepaidCondition
- dimensionMapValuemap<string, string>Description
- payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in
- typestringDescriptionDefaultProductItemDimensionPrepaidCondition
- productItemIdstringDescription
- dimensionsmap<string, string>Description
- payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in
- typestringDescriptionDefaultProductItemPrepaidCondition
- productItemIdstringDescription
- prepaidConditionsHistorymap<string, payment.billing.prepaid_to_product.PrepaidCondition.in[]>Description
- commitmentIdstringDescription
- orderIdstringDescription
- orderItemIdstringDescription
- senderPrepaidUristringDescription
- customPrioritynumberDescription
- prepaidPrioritypayment.pricing.prepaid.PrepaidPriority.inDescription
- startAtMidCyclebooleanDescription
- realTimePricingbooleanDescription
- installmentspayment.billing.prepaid_to_product.PrepaidInstallments.inDescription
- prepaidInstallmentspayment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in[]requiredDescription
- amountPricenumberrequiredDescription
- scheduledPurchaseTimeInSecondsinteger<int64>requiredDescription
- typestringDescriptionDefaultcustomer_prepaid_by_price
- purchaseTypepayment.billing.prepaid_to_product.PrepaidPurchaseType.inDescription
- actualPrepaidChargePricenumberDescription
Responses
200
- payment.pricing.customer.detailed.DetailedCustomerPrepaid.outDescription
- objectpayment.pricing.customer.detailed.DetailedCustomerPrepaidByPrice.out
- idstringDescription
- customerIdstringDescription
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- firstCardEndTimeSecondsinteger<int64>Description
- productIdstringDescription
- prepaidOfferVersioninteger<int64>Description
- prepaidPricenumberDescription
- originalWorthnumberDescription
- originalCurrencystringExampleDescription
- preferredPurchasingPrepaidCurrencystringExampleDescription
- recurrenceFrequencypayment.pricing.BillingPeriod.outDescription
- intervalpayment.pricing.BillingPeriodInterval.inDescription
- intervalsCountinteger<int32>Description
- externalPaymentbooleanDescription
- relationIdstringDescription
- createdTimeInSecondsinteger<int64>Description
- labelstringDescription
- prepaidConditionspayment.billing.prepaid_to_product.PrepaidConditions.outDescription
- prepaidConditionsListpayment.billing.prepaid_to_product.PrepaidCondition.out[]Description
- payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in
- typestringDescriptionDefaultDimensionValueMapPrepaidCondition
- dimensionMapValuemap<string, string>Description
- payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in
- typestringDescriptionDefaultProductItemDimensionPrepaidCondition
- productItemIdstringDescription
- dimensionsmap<string, string>Description
- payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in
- typestringDescriptionDefaultProductItemPrepaidCondition
- productItemIdstringDescription
- prepaidConditionsHistorymap<string, payment.billing.prepaid_to_product.PrepaidCondition.out[]>Description
- commitmentIdstringDescription
- orderIdstringDescription
- orderItemIdstringDescription
- senderPrepaidUristringDescription
- customPrioritynumberDescription
- prepaidPrioritypayment.pricing.prepaid.PrepaidPriority.inDescription
- startAtMidCyclebooleanDescription
- realTimePricingbooleanDescription
- installmentspayment.billing.prepaid_to_product.PrepaidInstallments.outDescription
- prepaidInstallmentspayment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in[]requiredDescription
- amountPricenumberrequiredDescription
- scheduledPurchaseTimeInSecondsinteger<int64>requiredDescription
- internalStatusstringDescription
- prepaidPaymentTimeInSecondsinteger<int64>Description
- paymentIdstringDescription
- paymentStatuspayment.payment.PaymentStatus.inDescription
- firstInvoiceUristringDescription
- modifiedTimeInSecondsinteger<int64>Description
- typestringDescriptionDefaultdetailed_customer_prepaid_by_price
- purchaseTypepayment.billing.prepaid_to_product.PrepaidPurchaseType.inDescription
- actualPrepaidChargePricenumberDescription
- objectpayment.pricing.customer.detailed.DetailedCustomerPrepaidByUsage.out
- idstringDescription
- customerIdstringDescription
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- firstCardEndTimeSecondsinteger<int64>Description
- productIdstringDescription
- prepaidOfferVersioninteger<int64>Description
- prepaidPricenumberDescription
- originalWorthnumberDescription
- originalCurrencystringExampleDescription
- preferredPurchasingPrepaidCurrencystringExampleDescription
- recurrenceFrequencypayment.pricing.BillingPeriod.outDescription
- intervalpayment.pricing.BillingPeriodInterval.inDescription
- intervalsCountinteger<int32>Description
- externalPaymentbooleanDescription
- relationIdstringDescription
- createdTimeInSecondsinteger<int64>Description
- labelstringDescription
- prepaidConditionspayment.billing.prepaid_to_product.PrepaidConditions.outDescription
- prepaidConditionsListpayment.billing.prepaid_to_product.PrepaidCondition.out[]Description
- payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in
- typestringDescriptionDefaultDimensionValueMapPrepaidCondition
- dimensionMapValuemap<string, string>Description
- payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in
- typestringDescriptionDefaultProductItemDimensionPrepaidCondition
- productItemIdstringDescription
- dimensionsmap<string, string>Description
- payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in
- typestringDescriptionDefaultProductItemPrepaidCondition
- productItemIdstringDescription
- prepaidConditionsHistorymap<string, payment.billing.prepaid_to_product.PrepaidCondition.out[]>Description
- commitmentIdstringDescription
- orderIdstringDescription
- orderItemIdstringDescription
- senderPrepaidUristringDescription
- customPrioritynumberDescription
- prepaidPrioritypayment.pricing.prepaid.PrepaidPriority.inDescription
- startAtMidCyclebooleanDescription
- realTimePricingbooleanDescription
- installmentspayment.billing.prepaid_to_product.PrepaidInstallments.outDescription
- prepaidInstallmentspayment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in[]requiredDescription
- amountPricenumberrequiredDescription
- scheduledPurchaseTimeInSecondsinteger<int64>requiredDescription
- internalStatusstringDescription
- prepaidPaymentTimeInSecondsinteger<int64>Description
- paymentIdstringDescription
- paymentStatuspayment.payment.PaymentStatus.inDescription
- firstInvoiceUristringDescription
- modifiedTimeInSecondsinteger<int64>Description
- typestringDescriptionDefaultdetailed_customer_prepaid_by_usage
- purchaseTypepayment.billing.prepaid_to_product.PrepaidPurchaseType.inDescription
- prepaidUsagenumberDescription
- prepaidFullPricenumberDescription
400
401
403
404
409
500
curl
curl --request POST \
--url https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"installments": {
"prepaidInstallments": [
{
"amountPrice": "",
"scheduledPurchaseTimeInSeconds": 0
}
]
},
"type": "customer_prepaid_by_price"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"installments": {
"prepaidInstallments": [
{
"amountPrice": "",
"scheduledPurchaseTimeInSeconds": 0
}
]
},
"type": "customer_prepaid_by_price"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"installments": {
"prepaidInstallments": [
{
"amountPrice": "",
"scheduledPurchaseTimeInSeconds": 0
}
]
},
"type": "customer_prepaid_by_price"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid"
payload = json.dumps({
"installments": {
"prepaidInstallments": [
{
"amountPrice": "",
"scheduledPurchaseTimeInSeconds": 0
}
]
},
"type": "customer_prepaid_by_price"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successfully created prepaid order and returns detailed credit information with payment status
{}400
// Invalid prepaid order configuration, unsupported price amount, or malformed request body
401
// Authentication required or invalid API key provided
403
// Insufficient permissions to create customer prepaid orders
404
// Customer not found or prepaid service not configured for account
409
// Conflicting prepaid order or payment method configuration issues
500
// Internal server error occurred while creating prepaid order