Passer au contenu principal
POST
/
v1
/
sessions
session
curl --request POST \
  --url https://pay.sandbox.yabetoopay.com/v1/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "total": 200000,
  "currency": "xaf",
  "accountId": "acct_iNXIGeot1lqyhGI5eP7KL0LcWTCTgFLytfRa",
  "successUrl": "https://monsite.com/checkout-success",
  "cancelUrl": "https://monsite.com/checkout-cancel",
  "metadata": {
    "test": "ok"
  },
  "items": [
    {
      "productId": "prt_XoPjNH2l5Q1g19mIZPxqYWEXwRJzOmlNXhcb",
      "quantity": 1,
      "price": 200000,
      "productName": "Écran LG"
    }
  ]
}'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
total
integer
required
currency
string
required
accountId
string
required
successUrl
string
required
cancelUrl
string
required
metadata
object
required
items
object[]
required

Response

200 - application/json

The response is of type object.

I