Checkout
Operations related to checkout
Get all the necessary user identifiers to purchase the requested basket. Some products require specific user identifiers in order to be purchased. For example, a product that grants a Discord role will require a discord_id, and a product that provides perks in Ark: Survival Ascended will require an eos_id. This route returns all the necessary information before proceeding with a purchase.
No API key is required.
Store ID. This ID is required in order to identify to which store you want to checkout. If you have an API key, you can request the /whoami route in order to figure out your store ID.
762An array of product id to be purchased.
[12,123]Array of required user identifiers.
["discord_id","eos_id"]Error in your request
Internal Server Error
GET /v1/store/checkout/identifiers?store=762&products=12 HTTP/1.1
Host: api.tip4serv.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
"discord_id",
"eos_id"
]Generate an checkout link, provide a basket of what you want to checkout, and the endpoint will return you an URL to which to redirect.
No API key is required.
Store ID. This ID is required in order to identify to which store you want to checkout. If you have an API key, you can request the /whoami route in order to figure out your store ID.
762Display currency code (optional). Supported currencies: GBP, USD, EUR, CAD, AUD, CHF. If omitted, prices are displayed in store currency. Converts all product prices (price, old_price, min_donation) and custom field prices.
USDIf enabled, the endpoint will send a 302 Redirection instead of an JSON.
falseExample: falseDisplay currency code (optional). Supported currencies: GBP, USD, EUR, CAD, AUD, CHF. If omitted, prices are displayed in store currency. Converts all product prices (price, old_price, min_donation) and custom field prices.
USDThis optional parameter allows you to redirect your users to a specific URL after the payment was processed successfully.
https://mywebsite.com/page/successThis optional parameter allows you to redirect your users to a specific URL if the user want to return back.
https://mywebsite.com/page/cancelThis optional parameter allows you to redirect your users to a specific URL after the payment was processed successfully but is still being verified.
https://mywebsite.com/page/pendingCheckout link generated successfully.
https://fivem.tip4serv.com/checkout?key=eyJwcm9kdWN0cyI6IFt7InByb2R1Y3RfaWQiOjEyLCJ0eXBlIjoiYWRkdG9jYXJ0In1dfQ%3D%3DCheckout link generated successfully.
Error in your request
User not found
Internal Server Error
POST /v1/store/checkout?store=762 HTTP/1.1
Host: api.tip4serv.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 712
{
"products": [
{
"product_id": 12,
"product_slug": "product-1",
"type": "addtocart",
"quantity": 1,
"donation_amount": 10.5,
"server_selection": 12,
"custom_fields": {
"2": 1,
"3": 3,
"4": "wooden_sword"
}
}
],
"currency": "USD",
"user": {
"email": "duster@example.com",
"minecraft_username": "Notch",
"steam_id": "76561198000000000",
"discord_id": 274785054121525250,
"epic_id": "1234567890123456789",
"player_id": "C84A567",
"eos_id": "0123456789abcdef0123456789abcdef",
"fivem_citizen_id": "abc123",
"ingame_username": "PlayerOne",
"rust_username": "RustPlayer"
},
"redirect_success_checkout": "https://mywebsite.com/page/success",
"redirect_canceled_checkout": "https://mywebsite.com/page/cancel",
"redirect_pending_checkout": "https://mywebsite.com/page/pending"
}{
"url": "https://fivem.tip4serv.com/checkout?key=eyJwcm9kdWN0cyI6IFt7InByb2R1Y3RfaWQiOjEyLCJ0eXBlIjoiYWRkdG9jYXJ0In1dfQ%3D%3D"
}Last updated
