Checkout
GET /v1/campaigns/{id}/checkout
Returns information required to display a checkout page for the user.
The following rows should be displayed on the page substituting the variables:
Row | Amount |
---|---|
Postcards (price_calculation ) | price |
First Class Postage | Free |
Credits | credit |
Already Paid | already_paid |
Order Total | to_be_paid |
- The Credits and Already Paid rows should not be visible if they are zero.
- If the Order Total row is zero, then it means that the campaign will be paid for with credits.
- All fields are formatted as needed (that is why they are strings) except for the
to_be_paid_amount
.
The appropriate values should be used from without_sender
and with_sender
fields depending on the send_copy_to_sender
field, and they are there for you
to be able to dynamically change the values if the user checks / unchecks that
checkbox.
Path Parameters
id
integer
Required
The id of the campaign.
Example Request
curl -X GET https://api.realmailers.com/v1/campaigns/{id}/checkout \
-H 'Authorization: Bearer YOUR_API_KEY'
Response Schema
{
send_copy_to_sender: Boolean
thumbnails: Array(URL)
proof: URL
without_sender: {
price_calculation: String
to_be_paid_amount: Float
already_paid: String
to_be_paid: String
credit: String
price: String
}
with_sender: {
price_calculation: String
to_be_paid_amount: Float
already_paid: String
to_be_paid: String
credit: String
price: String
}
}