pub struct CreateMandateRequest {
pub approval_redirect: Option<PaymentRedirect>,
pub asset: Asset,
pub customer_display: Option<MandateCustomerDisplay>,
pub expires_at: Option<DateTime<Utc>>,
pub metadata: Option<Metadata>,
pub policy: Option<MandatePolicy>,
pub revocation_redirect: Option<PaymentRedirect>,
}Expand description
A request to create a new mandate. The merchant is inferred from the API key. The mandate is returned in created status with no source. Attach a source next by approving the mandate, using Get wallet approval options then Approve a mandate with a wallet, which returns a pending approval; the mandate becomes approval_succeeded once that approval succeeds. The mandate is denominated in asset, fixed at creation. policy is optional. Omit it or send {} to default to a Coinbase-configured monthly max. The response includes the resolved policy. If you set maxPerPeriod, include both amount and period.
JSON schema
{
"description": "A request to create a new mandate. The merchant is inferred from the API key. The mandate is returned in `created` status with no source. Attach a source next by approving the mandate, using **Get wallet approval options** then **Approve a mandate with a wallet**, which returns a `pending` approval; the mandate becomes `approval_succeeded` once that approval succeeds. The mandate is denominated in `asset`, fixed at creation. `policy` is optional. Omit it or send `{}` to default to a Coinbase-configured monthly max. The response includes the resolved `policy`. If you set `maxPerPeriod`, include both `amount` and `period`.",
"examples": [
{
"approvalRedirect": {
"failureUrl": "https://merchant.example.com/mandate/approval/failed",
"successUrl": "https://merchant.example.com/mandate/approval/success"
},
"asset": "usdc",
"customerDisplay": {
"merchantName": "Acme Store"
},
"expiresAt": "2027-06-15T12:00:00.000Z",
"metadata": {
"customer_id": "cust_12345"
},
"policy": {
"maxPerAuthorization": "50.00",
"maxPerPeriod": {
"amount": "500.00",
"period": "month"
}
},
"revocationRedirect": {
"failureUrl": "https://merchant.example.com/mandate/revocation/failed",
"successUrl": "https://merchant.example.com/mandate/revocation/success"
}
}
],
"type": "object",
"required": [
"asset"
],
"properties": {
"approvalRedirect": {
"description": "Optional merchant URLs used by the hosted mandate approval flow. The approval page redirects to `successUrl` when approval succeeds, or `failureUrl` when it fails. Omit to keep the customer on the Coinbase-hosted experience.",
"examples": [
{
"failureUrl": "https://merchant.example.com/mandate/approval/failed",
"successUrl": "https://merchant.example.com/mandate/approval/success"
}
],
"allOf": [
{
"$ref": "#/components/schemas/PaymentRedirect"
}
]
},
"asset": {
"description": "The unit of account the mandate's `policy` caps are denominated in (e.g., `500` means 500 of this asset). Fixed at creation. This is only the denomination for the limits; the funding `source` may hold a different asset (for example, limits in `usdc` against a `usdt` source). Each authorization's amount is converted into this asset at authorization time to evaluate the caps, so the caps are always enforced in a single denomination.",
"examples": [
"usdc"
],
"allOf": [
{
"$ref": "#/components/schemas/Asset"
}
]
},
"customerDisplay": {
"$ref": "#/components/schemas/MandateCustomerDisplay"
},
"expiresAt": {
"description": "The UTC ISO 8601 timestamp after which this mandate can no longer be authorized against. Omit for a mandate with no expiry.",
"examples": [
"2027-06-15T12:00:00.000Z"
],
"type": "string",
"format": "date-time"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
},
"policy": {
"description": "Optional. Omit or send `{}` to default to a Coinbase-configured monthly max. If you set `maxPerPeriod`, include both `amount` and `period`.",
"examples": [
{
"maxPerAuthorization": "50.00",
"maxPerPeriod": {
"amount": "500.00",
"period": "month"
}
}
],
"allOf": [
{
"$ref": "#/components/schemas/MandatePolicy"
}
]
},
"revocationRedirect": {
"description": "Optional merchant URLs used by the hosted mandate revocation flow. The revocation page redirects to `successUrl` when revocation succeeds, or `failureUrl` when it fails. Omit to keep the customer on the Coinbase-hosted experience.",
"examples": [
{
"failureUrl": "https://merchant.example.com/mandate/revocation/failed",
"successUrl": "https://merchant.example.com/mandate/revocation/success"
}
],
"allOf": [
{
"$ref": "#/components/schemas/PaymentRedirect"
}
]
}
}
}Fields§
§approval_redirect: Option<PaymentRedirect>Optional merchant URLs used by the hosted mandate approval flow. The approval page redirects to successUrl when approval succeeds, or failureUrl when it fails. Omit to keep the customer on the Coinbase-hosted experience.
asset: AssetThe unit of account the mandate’s policy caps are denominated in (e.g., 500 means 500 of this asset). Fixed at creation. This is only the denomination for the limits; the funding source may hold a different asset (for example, limits in usdc against a usdt source). Each authorization’s amount is converted into this asset at authorization time to evaluate the caps, so the caps are always enforced in a single denomination.
customer_display: Option<MandateCustomerDisplay>§expires_at: Option<DateTime<Utc>>The UTC ISO 8601 timestamp after which this mandate can no longer be authorized against. Omit for a mandate with no expiry.
metadata: Option<Metadata>§policy: Option<MandatePolicy>Optional. Omit or send {} to default to a Coinbase-configured monthly max. If you set maxPerPeriod, include both amount and period.
revocation_redirect: Option<PaymentRedirect>Optional merchant URLs used by the hosted mandate revocation flow. The revocation page redirects to successUrl when revocation succeeds, or failureUrl when it fails. Omit to keep the customer on the Coinbase-hosted experience.