Payment Gateway

Creates a payment request with the payment gateway set in MyRent and returns the URL to redirect the guest to.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates a payment request with the payment gateway selected for the account in MyRent (for example Stripe, WSPay or Teya) and returns a URL. Redirect the guest to url; MyRent forwards the guest to the gateway and, after the payment, back to your url.success, url.error or url.cancel page.

Headers: user_guid and b2b_guid. See Web API - Guide.

Example request body

{
  "toppay": {
    "b2b_id": "200",
    "user_id": "100",
    "currency_id": "2",
    "language_id": "1"
  },
  "price": 250.00,
  "subject": "Reservation: ORDER-1001",
  "note": "Advance payment",
  "erp_id": "ORDER-1001",
  "url": {
    "success": "https://www.example.com/booking/success",
    "error": "https://www.example.com/booking/error",
    "cancel": "https://www.example.com/booking/cancel"
  },
  "buyer": {
    "name": "Guest Name",
    "email": "[email protected]",
    "tel": "+385 91 000 0000"
  },
  "product": {
    "img": "https://www.example.com/images/apartment.jpg"
  }
}

Responses

CodeMeaning
200Payment request created. Redirect the guest to url.
401Missing or wrong b2b_guid / user_guid headers.
403toppay.b2b_id does not match the b2b_guid header.
404toppay.b2b_id or toppay.user_id is missing.
Body Params
double
required

Amount to pay.

string

Payment description shown to the guest, for example Reservation: ORDER-1001.

string

Additional note.

string

Your basket, cart or order ID.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json