Skip to main content
POST
Cancel a payment request

Authorizations

Authorization
string
header
required

Bearer token authentication. Include your API token in the Authorization header.

Format: Authorization: Bearer <your-token>

Path Parameters

paymentRequestId
string<uuid>
required

Response

The canceled payment request

id
string<uuid>
required
object
enum<string>
required
Available options:
payment_request
status
enum<string>
required

A payment request's lifecycle. It leaves requested exactly once, and only on Stripe's word or your cancel.

Available options:
requested,
succeeded,
canceled,
expired
mode
enum<string>
required
Available options:
payment,
subscription
amount
integer
required

What the person is charged at checkout, in minor units. In subscription mode, what the first period costs after any discount.

currency
string
required
description
string
required
category
enum<string>
required

What is being paid for, the same three values as PayPal Orders v2 items[].category (PHYSICAL_GOODS, DIGITAL_GOODS, DONATION; developer.paypal.com/docs/api/orders/v2/). The App Store Review Guidelines (developer.apple.com/app-store/review/guidelines/) decide where each can be paid:

  • physical_goods: physical goods, and services used in the real world, such as a haircut or a ride (3.1.3(e)). Payable anywhere.
  • digital_goods: anything used in an app or online. A person pays by opening the link in Safari, and only on the United States storefront (3.1.1(a)); sending one to a person whose devices report only other storefronts returns 422 (error code 2006). A tip to an agent or a creator is digital_goods (3.1.1: tips to digital content providers use In-App Purchase).
  • donation: money for a charity or a fundraiser. Collected outside the app, on any storefront (3.2.2(iv): such apps "may only collect funds outside of the app, such as via Safari…").
Available options:
physical_goods,
digital_goods,
donation
checkout_url
string
required

Relay's pay page for this request, https://pay.relayapp.im/<token>. Anyone holding it can pay the request. Send it back unchanged in a payment part.

expires_at
string<date-time>
required

When the request stops accepting payment and moves to expired, 23 hours after it was created.

metadata
object
required
stripe
object
required

The ids of the Stripe objects on your connected account, your join keys into your own Stripe Dashboard, API and webhooks.

created_at
string<date-time>
required
updated_at
string<date-time>
required
image_url
string

The product picture, on Relay's image host. Absent without one.

price_id
string

Subscription mode.

quantity
integer

Subscription mode.

interval
enum<string>

Subscription mode.

Available options:
day,
week,
month,
year
interval_count
integer

Subscription mode.

discount
object

Subscription mode only. One coupon or one promotion code from your connected Stripe account, never both.

paid_at
string<date-time>

Absent until the request succeeds.