Skip to main content
POST
/
account-updater
/
jobs
C#
using Gr4vy;
using Gr4vy.Models.Components;
using System.Collections.Generic;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.AccountUpdater.Jobs.CreateAsync(accountUpdaterJobCreate: new AccountUpdaterJobCreate() {
    PaymentMethodIds = new List<string>() {
        "ef9496d8-53a5-4aad-8ca2-00eb68334389",
        "f29e886e-93cc-4714-b4a3-12b7a718e595",
    },
});

// handle response
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "merchant_account_id": "<string>",
  "inquiries": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "account-updater-inquiry"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "type": "account-updater-job"
}
This endpoint requires the payment-methods.write scope.

Authorizations

Authorization
string
header
required

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

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Example:

"default"

Body

application/json
payment_method_ids
string<uuid>[]
required

A list of payment method IDs to request an update for.

Required array length: 1 - 100 elements

Response

A scheduled account updater job when one or more payment methods were scheduled for update.

id
string<uuid>
required

The ID for the account updater job.

merchant_account_id
string
required

The ID of the merchant account this job belongs to.

inquiries
AccountUpdaterInquirySummary · object[]
required

A list of the payment methods that have been scheduled for an update.

created_at
string<date-time>
required

The date and time when this payment method was first created in our system.

updated_at
string<date-time>
required

The date and time when this payment method was last updated in our system.

type
string
default:account-updater-job

Always account-updater-job

Allowed value: "account-updater-job"