Retrieve the details of a specific payment instrument used for sub-entity payouts.
Payment instrument details
Bad Request
Unauthorized
// For more information please refer to https://github.com/checkout/checkout-sdk-go import ( "github.com/checkout/checkout-sdk-go" "github.com/checkout/checkout-sdk-go/configuration" ) // API Keys api, err := checkout. Builder(). StaticKeys(). WithSecretKey("secret_key"). WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION WithEnvironmentSubdomain("{prefix}"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints. Build() if err != nil { return nil, err } // OAuth api, err := checkout. Builder(). OAuth(). WithClientCredentials("client_id", "client_secret"). WithScopes([]string{configuration.Accounts}). WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION WithEnvironmentSubdomain("{prefix}"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints. Build() if err != nil { return nil, err } response, err := api.Accounts.RetrievePaymentInstrumentDetails("entity_id", "payment_instrument_id") if err != nil { return nil, err } return response, nil
{- "id": "ppi_qn4nis4k3ykpzzu7cvtuvhqqga",
- "label": "Bob's Bank Account",
- "type": "bank_account",
- "currency": "GBP",
- "country": "GB",
- "document": {
- "type": "bank_statement",
- "file_id": "file_wxglze3wwywujg4nna5fb7ldli"
}, - "status": "verified",
- "instrument_id": "src_pdasnoaxrtoevpyh3opgaxcrti"
}Set an existing payment instrument as default. This will make it the destination instrument when a scheduled payout is made. You can also update the label of a payment instrument.
Payment instrument updated successfully
Unauthorized
Unprocessable entity
Precondition required
{- "label": "Peter's Personal Account",
- "default": true,
- "headers": {
- "if-match": "Y3Y9MCZydj0w"
}
}{- "_links": {
}, - "id": "ppi_qn4nis4k3ykpzzu7cvtuvhqqga"
}Create a bank account payment instrument for your sub-entity. You can use this payment instrument as a payout destination.
A JSON payload containing the payment instrument details.
Created
Bad Request
Unauthorized
Invalid data was sent
{- "label": "Bob's Bank Account",
- "type": "bank_account",
- "currency": "GBP",
- "country": "GB",
- "instrument_details": {
- "account_number": "12345678",
- "bank_code": "050389"
}, - "document": {
- "type": "bank_statement",
- "file_id": "file_wxglze3wwywujg4nna5fb7ldli"
}
}{- "id": "ppi_qn4nis4k3ykpzzu7cvtuvhqqga"
}Fetch all of the payment instruments for a sub-entity. You can filter by status to identify verified instruments that are ready to be used for Payouts.
OK
Bad Request
Unauthorized
// For more information please refer to https://github.com/checkout/checkout-sdk-go import ( "github.com/checkout/checkout-sdk-go" "github.com/checkout/checkout-sdk-go/accounts" "github.com/checkout/checkout-sdk-go/configuration" ) // API Keys api, err := checkout. Builder(). StaticKeys(). WithSecretKey("secret_key"). WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION WithEnvironmentSubdomain("{prefix}"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints. Build() if err != nil { return nil, err } // OAuth api, err := checkout. Builder(). OAuth(). WithClientCredentials("client_id", "client_secret"). WithScopes([]string{configuration.Accounts}). WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION WithEnvironmentSubdomain("{prefix}"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints. Build() if err != nil { return nil, err } query := accounts.PaymentInstrumentsQuery{Status: "pending"} response, err := api.Accounts.QueryPaymentInstruments("entity_id", query) if err != nil { return nil, err } return response, nil
{- "data": [
- {
- "id": "ppi_qn4nis4k3ykpzzu7cvtuvhqqga",
- "label": "Bob's Bank Account",
- "type": "bank_account",
- "currency": "GBP",
- "country": "GB",
- "status": "verified",
- "instrument_id": "src_pdasnoaxrtoevpyh3opgaxcrti"
}, - {
- "id": "ppi_yk7nmh5jypmqzw5kb6kshj2iiy",
- "label": "Bruno's Bank Account",
- "type": "bank_account",
- "currency": "EUR",
- "country": "FR",
- "status": "pending"
}
]
}