post
https://api.my-rent.net/p/r
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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
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
| Code | Meaning |
|---|---|
| 200 | Payment request created. Redirect the guest to url. |
| 401 | Missing or wrong b2b_guid / user_guid headers. |
| 403 | toppay.b2b_id does not match the b2b_guid header. |
| 404 | toppay.b2b_id or toppay.user_id is missing. |
