POST /v1/cashier/session/create/{{API_KEY}}
Content-Type: application/json
Host: api-sandbox.bridgerpay.com
Authorization: Bearer {{ACCESS_TOKEN}}
Accept-Language: en
{
"cashier_key": "{{CASHIER_KEY}}",
"order_id": "g173aa02",
"first_name": "Juan",
"last_name": "Lopez",
"language": "en",
"currency": "EUR",
"country": "NL",
"state": null,
"address": "Boenluif 30",
"city": "Hoogwoud",
"zip_code": "1718 AZ",
"direct_payment_method": "credit_card",
"amount": 45.36,
"currency_lock": false,
"amount_lock": false,
"phone": "+311234445566",
"affiliate_id": null,
"tracking_id": null,
"platform_id": null,
"payload": null
}
Create Server Session By Merchant API Key
<URL>/v1/cashier/session/create/{{API_KEY}}
This method is used to create a server session for BridgerPay's Cashier with your cashier key (provided by BridgerPay). It generates a unique cashier token for later creating a user session, which in turn will be used to perform some operations, e.g. to make a deposit.
Path Parameters
Software-level credentials that identify a merchant and ensure secure access to sensitive information; provided by BridgerPay
Headers
Data format to present information in the response; only "application/json" is supported
Authorization mechanism: Bearer {{ACCESS_TOKEN}}
Parameter defining which language will be set on the UI by default. It is designated according to ISO 639-1 — Language Codes. The possible options are "en", "fr", "zn", "de", "es", "ar", "ru", and "pt"
Body Parameters
Software-level credentials that identify a merchant when creating a Cashier session; provided by BridgerPay
Transaction ID within the merchant's system
First name of a shopper whom this session is being created for, for example, to later deposit with a credit card
Parameter defining which language will be set for the shopper on the UI by default. It is designated according to ISO 639-1 — Language Codes. The possible options are "en", "fr", "zn", "de", "es", "ar", "ru", and "pt". If you specify both this parameter and the "Accept-Language" header parameter, the latter will be applied
Currency which the shopper's following payment transaction (e.g. deposit) will be originated in; designated according to ISO 4217 — Currency Codes (e.g. "USD", "CNY", or "EUR")
Country where this transaction will be created; designated according to ISO 3166-1 — Country Codes (e.g. "US", "CN", or "BE")
State where this transaction will be created; applicable to the USA, Canada, and Australia
direct_payment_method
optional
Parameter defining which payment method should be suggested to the shopper on the UI by default, e.g. "credit_card" or "apm". The shopper can ignore this suggestion and choose another method, though
Transaction amount; must be more than 0
Parameter defining whether the shopper is unable to change the specified currency when making the payment transaction ('true') or is able ('false', used by default). We recommend that you do not allow this (i.e. type 'true') because some PSPs, once they open a session, do not recheck the currency and transfer the specified amount in a wrong currency
Parameter defining whether the shopper is unable to change the specified amount when making the payment transaction ('true') or is able ('false', used by default). Additionally, if 'true', any amount, even if it is beyond the limits imposed by the PSP, will be applied
Affiliate or intermediary ID
Tracking ID associated with the affiliate or intermediary
Message transmitted with the other data to match the sessions when the shopper's following payment transaction (e.g. deposit) is approved. It is used for ensuring additional security
Successful response
{
"response": {
"status": "OK",
"code": 200,
"message": "OK"
},
"result": {
"cashier_token": "{{CASHIER_TOKEN}}"
}
}
One or more required parameters are missing or have incorrect format
{
"response": {
"status": "BadRequest",
"code": 400,
"message": "validation_error"
},
"result": [
{
"type": "validation_error",
"field": null,
"message": "The field 'order_id' can't be empty"
},
{
"type": "validation_error",
"field": null,
"message": "The field 'currency' can't be empty"
}
]
}
1) Attempt to access the resource without merchant authorization (empty response)
2) Invalid API_KEY provided to access the resource
{
"response": {
"status": "Unauthorized",
"code": 401,
"message": "Unauthorized"
}
"result": null
}
1) No PSP available to the merchant supports the specified currency (message: "payment_method_not_found")
2) No PSP available to the merchant works in the specified country
{
"response": {
"status": "Forbidden",
"code": 403,
"message": "country_not_supported"
},
"result": null
}
415: Unsupported Media Type
Content-Type header parameter has not been provided, or the specified value is not supported by BridgerPay (empty response)