POST
/
api
/
v1
/
order
/
{orderId}
/
attach-coupon
Attach a coupon to a Physical Card Order
const url = 'https://api.gnosispay.com/api/v1/order/{orderId}/attach-coupon';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"couponCode":"DISCOUNT2023"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "couponCode": "DISCOUNT2023"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

orderId
string
required

The unique identifier of the card order to which the coupon will be attached.

Body

application/json
couponCode
string
required

The coupon code to be applied to the order.

Example:

"DISCOUNT2023"

Response

Coupon successfully attached to the card order.

couponCode
string

The coupon code that was applied to the order.

Example:

"DISCOUNT2023"