Skip to content
On this page

/swap/create

Creates a new swap task with the given authId and paymentMethodId. When successful, a swap.success webhook event is emitted.

HTTP Request

POST https://api.q2open.io/v1/swap/create

Arguments

ParameterDescription
authIdID of auth to create a swap for.
paymentMethodIdID of payment method to link to the swap.

Returns

Returns an object with a success property if the swap was created. Returns an error otherwise.

Example Request

shell
curl "https://api.q2open.io/v1/swap/create" \
  -H "Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e" \
  -H "Content-Type: application/json" \
  -d '{
    "authId": "566595c8ce88ccec69328566",
    "paymentMethodId": "5b4cdade36c0c10108a57405"
  }'