Payment Gateways
Overview
This resource represents Payment Gateways (allowing integration with providers such Stripe, Ingenico etc.) that you can later assign to Rentals and start accepting payments via credit card.
Parameters
- OAuth Scopes:
- preferences_payments_read
- preferences_payments_write
Name | Type | Read/Write | Description |
---|---|---|---|
account | Integer | Read | Account's ID related to the Payment Gateway |
id | BigInteger | Read | Uniq identifier. |
name | String | Read | Payment Gateway's name serving as an additional identifier. |
test | Boolean | Read | Submitted requests will not be charged if set to true. |
gateway_name | String | Read | Payment Gateway's name, available values are described in enums section |
credentials | Object | Read | Credentials used for payment gateway authentication. |
supported_cardtypes | Array | Read | Array of String values containing supported cardtypes for selected gateway. |
supported_currencies | Array | Read | Array of string values containing supported currencies for selected gateway. |
tokenize_credit_card_details | Boolean | Read | Credit Card details will be tokenized if set to true before card's authorization. The value will be automatically set to true when handling 3DS flow. |
host_booking_pay_wallet_id | String | Read | Wallet ID for BookingPay host. |
created_at | Time | Read | Payment Gateway's creation time. |
updated_at | Time | Read | Payment Gateway's creation time. |
Name | Type | Read/Write | Description | Constraints |
---|---|---|---|---|
account | Integer | Read | Account's ID related to the Payment Gateway | |
id | BigInteger | Read | Uniq identifier. | |
name | String | Read/Write | Payment Gateway's name serving as an additional identifier. | Required, must not contain non-printing characters |
test | Boolean | Read/Write | Submitted requests will not be charged if set to true (test mode/sandbox will be used). | |
gateway_name | String | Read/Write | Payment Gateway's name, available values are described in: enums section | Required, must be one of the available gateway names |
credentials | Object | Read/Write | Credentials used for payment gateway authentication. | Required, the schema depends on gateway_name |
supported_cardtypes | Array | Read/Write | Array of String values containing supported cardtypes for selected gateway, available values are described in: enums section | Required, must contain valid cardtypes supported by a given payment gateway |
supported_currencies | Array | Read/Write | Array of string values containing supported currencies for selected gateway. | Required, must contain valid currencies |
tokenize_credit_card_details | Boolean | Read/Write | Credit Card details will be tokenized if set to true before card's authorization. The value will be automatically set to true when handling 3DS flow. | |
host_booking_pay_wallet_id | String | Read | Wallet ID for BookingPay host. | |
created_at | Time | Read | Payment Gateway's create time. | |
updated_at | Time | Read | Payment Gateway's update time. |
List Payment Gateways
List all Payment Gateways for a given account.
GET /payment_gateways
- OAuth Scopes:
- preferences_payments_read
response.json
{
"links": {
"payment_gateways.account": "https://www.bookingsync.com/api/v3/accounts/{payment_gateways.account}"
},
"payment_gateways": [
{
"links": {
"account": 1
},
"id": 1,
"name": "TestingGatewayName",
"test": true,
"gateway_name": "bogus",
"credentials": {
"login": "login"
},
"supported_cardtypes": [
"visa",
"master"
],
"supported_currencies": [
"EUR",
"THB"
],
"tokenize_credit_card_details": true,
"host_booking_pay_wallet_id": null,
"created_at": "2019-08-15T14:27:48Z",
"updated_at": "2019-08-21T16:07:47Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1",
"last": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}
Get a single Payment Gateway
Returns a single payment gateway identified by ID.
GET /payment_gateways/:payment_gateway_id
- OAuth Scopes:
- preferences_payments_read
response.json
{
"links": {
"payment_gateways.account": "https://www.bookingsync.com/api/v3/accounts/{payment_gateways.account}"
},
"payment_gateways": [
{
"links": {
"account": 1
},
"id": 1,
"name": "TestingGatewayName",
"test": true,
"gateway_name": "bogus",
"credentials": {
"login": "login"
},
"supported_cardtypes": [
"visa",
"master"
],
"supported_currencies": [
"EUR",
"THB"
],
"tokenize_credit_card_details": true,
"host_booking_pay_wallet_id": null,
"created_at": "2019-08-15T14:27:48Z",
"updated_at": "2019-08-21T16:07:47Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1",
"last": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}
Create a new Payment Gateway
Creates a Payment Gateway
POST /payment_gateways
- OAuth Scopes:
- preferences_payments_write
request.json
{
"payment_gateways": [
{
"name": "TestingGatewayName",
"test": true,
"gateway_name": "bogus",
"credentials": {
"login": "login"
},
"supported_cardtypes": [
"visa",
"master"
],
"supported_currencies": [
"EUR",
"THB"
],
"tokenize_credit_card_details": true
}
]
}
response.json
{
"links": {
"payment_gateways.account": "https://www.bookingsync.com/api/v3/accounts/{payment_gateways.account}"
},
"payment_gateways": [
{
"links": {
"account": 1
},
"id": 1,
"name": "TestingGatewayName",
"test": true,
"gateway_name": "bogus",
"credentials": {
"login": "login"
},
"supported_cardtypes": [
"visa",
"master"
],
"supported_currencies": [
"EUR",
"THB"
],
"tokenize_credit_card_details": true,
"host_booking_pay_wallet_id": null,
"created_at": "2019-08-15T14:27:48Z",
"updated_at": "2019-08-21T16:07:47Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1",
"last": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}
Update a Payment Gateway
Returns an updated payment gateway identified by ID.
PUT /payment_gateways/:payment_gateway_id
- OAuth Scopes:
- preferences_payments_write
request.json
{
"payment_gateways": [
{
"name": "TestingGatewayName",
"test": true,
"gateway_name": "bogus",
"credentials": {
"login": "login"
},
"supported_cardtypes": [
"visa",
"master"
],
"supported_currencies": [
"EUR",
"THB"
],
"tokenize_credit_card_details": true
}
]
}
response.json
{
"links": {
"payment_gateways.account": "https://www.bookingsync.com/api/v3/accounts/{payment_gateways.account}"
},
"payment_gateways": [
{
"links": {
"account": 1
},
"id": 1,
"name": "TestingGatewayName",
"test": true,
"gateway_name": "bogus",
"credentials": {
"login": "login"
},
"supported_cardtypes": [
"visa",
"master"
],
"supported_currencies": [
"EUR",
"THB"
],
"tokenize_credit_card_details": true,
"host_booking_pay_wallet_id": null,
"created_at": "2019-08-15T14:27:48Z",
"updated_at": "2019-08-21T16:07:47Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1",
"last": "https://www.bookingsync.com/api/v3/payment_gateways/1.json?bookings%5B%5D%5Bcanceled_at%5D=&page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}